mariadb: preserve secondary fence marker while pending#3216
Draft
weicao wants to merge 1 commit into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## helen/mariadb-r12-primary-roleprobe-marker-contract #3216 +/- ##
===================================================================================
Coverage 0.00% 0.00%
===================================================================================
Files 154 154
Lines 24296 24331 +35
===================================================================================
- Misses 24296 24331 +35 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
leon-ape
marked this pull request as draft
July 20, 2026 02:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fresh focused r18 on addon
ccd5c0e81ffaafa9b71c9f38c09b00a46246465cand syncer7502b58f45efd4fe8f2b06e5313230d9aec69510showed the primary staying converged, but a healthy secondary's durable remote-root fence marker oscillating betweensecondaryand absent.The exact cross-script cause is in
replication-entrypoint.sh: everyconfigure_replication_from_primary_service_once()iteration begins withmark_replication_pending(), and that generic readiness helper unconditionally removed.remote-root-fence-role. The roleProbe later recreatedsecondaryonly after its successful grant/fence tick. A recurring runtime-secondary reconcile therefore exposed an absent-marker window even though the secondary remainedread_only=1and otherwise healthy.Evidence scope is one focused run (
N=1), not a frequency claim:secondaryin 6 samples, absent in sample 7;secondary18 times, absent twice;read_only=0, all real ready markers, no pending/master.info/remote marker, and no new repair or authority commit;Evidence archive outer SHA-256:
f74b470331c40f075f366a59bd9fc0a35a7388ac045a50b9f04ae15a9d6ddd73; inner manifest SHA-256:7a86cfcdeed8fa9cef2c47fd53fb286f5c70b965592a58c9e446b366c400961a; 93/93 files independently verified.Fix
Remove
.remote-root-fence-rolemutation from genericmark_replication_pending().This keeps ownership aligned with the durable contract introduced by the parent PR:
secondarymeans a secondary remote-root fence is active;.replication-pending, but do not rewrite durable fence state;secondaryonly after the secondary fence is actually in place.No read-only, root-account, listener, authority acquisition/commit, switchover, error rollback, or ready-publication operation is removed or reordered.
TDD and gates
Before the production change, the exact-source test was deterministically RED:
74 examples, 2 failures;mark_replication_pending()andconfigure_replication_from_primary_service_once()functions, entered with marker=secondary, and observed marker=absent at the first secondary-reconcile step.After the change:
74 examples, 0 failures;182 examples, 0 failures, 1 historical pending;771 examples, 0 failures, 9 historical pendings;sh -n, ShellCheck error severity, Helm dependency/lint/default render, rendered contract, andgit diff --check: PASS.Runtime boundary
This PR has no post-fix runtime result yet (
N=0). The r18 product FAIL remains frozen. A new Test round is forbidden until official CI, exact Magnus review, and a fresh manifest containing current main plus every current weicao open MariaDB PR head are all complete.