fix(mariadb): recover guarded publication after crash - #3281
Open
weicao wants to merge 12 commits into
Open
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## helen/mariadb-r27-reviewed-15-head-candidate #3281 +/- ##
=============================================================================
Coverage 0.00% 0.00%
=============================================================================
Files 159 160 +1
Lines 24975 25493 +518
=============================================================================
- Misses 24975 25493 +518 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
added 7 commits
July 31, 2026 03:19
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
Independent review found a crash boundary where the publication handler could die after deleting the durable guard but before deleting its shared lock or returning a terminal response.
The paired addon then saw a stale lock and an ambiguous transport result. The old recovery performed strongest-fence rollback, but could not reconstruct whether publication had committed and left
guard=absent + publication_lock=present. The exact control returnedrc=3.This is an observed code-path failure, not preventive-only hardening.
Solution
The addon now gives each primary-accept transaction an exact durable token and treats the paired syncer's atomic guard→receipt rename as the only commit fact.
.primary-write-accept-pending..primary-write-publication-committedcontains the same exact token.The existing guard-first retry remains in place: the runtime enters the authoritative commit/publish transaction before public role lookup and never falls through to the old role-based writer-open path.
Deterministic evidence
The old crash control failed with
guard absent + stale lock + no receipt. The new exact-receipt control converges withrc=0, exact token preserved, stale lock removed, and no strongest rollback.A separate negative control seeds a mismatched receipt. It proves the addon does not accept it, restores the current transaction's exact guard, leaves the stale lock for lifecycle cleanup, applies strongest rollback, and returns
rc=3.Exact identity
83524394698ba6c425b26062eb700c5af22e32f252ba9bb63c851a92144f32ac7ce85af2fbfa231a17aabaf9dc809c5dbbbafe575acf31ba9777310650ea795d9ca167b2b022a7b3df4108aeb548b802Paired syncer PR #376 head:
c350875d087e7fe50346e637073aa6648916ce90.Methodology docs PR #1287 head:
aead9d14138581dd8db1770716835065ed102e29.Validation and boundary
Local exact-head validation is green:
git diff --check.Paired syncer full, race, vet, focused controls, and diff-check are green locally.
GitHub CI is terminal for both exact heads. Addon head
83524394698ba6c425b26062eb700c5af22e32f2is CLEAN with 7 SUCCESS, 0 pending, 0 red. Paired syncer headc350875d087e7fe50346e637073aa6648916ce90has 7 executed checks SUCCESS, 0 pending, 0 red, plus the trigger-onlycheck-imagejob SKIPPED by design; its unchanged retry cleared the sole pre-sourceinstall pcregrepenvironment failure.The previous R16 scene remains preserved. Test has made zero package/import/create/START/repair/rerun/cleanup mutations for this successor. There is no runtime/product PASS or release-ready claim. A new independent review is required after the Dev-only image identity is frozen; that image is review evidence and must not be reused by Test.
Reviewer focus
Please focus on:
Merge/runtime order: paired syncer PR #376 must be built and pinned before this addon transaction enters runtime validation.