Skip to content

fix(standby): re-check local_append_enabled_ inside the append critical section to close a promotion-fence race - #1326

Open
footka wants to merge 1 commit into
masterfrom
task/2026082000118401898
Open

fix(standby): re-check local_append_enabled_ inside the append critical section to close a promotion-fence race#1326
footka wants to merge 1 commit into
masterfrom
task/2026082000118401898

Conversation

@footka

@footka footka commented Aug 21, 2026

Copy link
Copy Markdown
Member

Task Description

Solution Description

Passed Regressions

Upgrade Compatibility

Other Information

Release Note

…al section to close a promotion-fence race

When SWITCHOVER TO STANDBY lands during the MAJOR MERGE medium_info
submission burst, the entry check in append (local_append_enabled_) and
the actual submit in append_'s CriticalGuard(ls_qs_) are not atomic
fence_local_append_ (set_local_append_enabled(false) + WaitQuiescent(ls_qs_))
cannot stop a caller that already passed the entry check but has not yet
entered the critical section. Such a submission lands after the fence
advancing end_scn past the cutover_scn captured by prepare_to_standby
which then trips the durably-fenced check and fails SWITCHOVER TO PRIMARY
with 4109 (OB_STATE_NOT_MATCH).

Fix: re-check local_append_enabled_ inside the critical section (double-
checked locking). 1.3 is unaffected: fence_local_append / local_append_enabled_
were introduced in 1.4.
@footka

footka commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

The mapping Dima issue is: "[seekdb][standby] In version 1.4, the primary promotion fence does not cover the internal commit channel for merges: during a peak of merge commits, a SWITCHOVER to promote to primary occasionally results in error 4109."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants