fix(mariadb): make switchover completion non-preemptive#3229
Draft
weicao wants to merge 2 commits into
Draft
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## helen/mariadb-r25-loopback-tls #3229 +/- ##
===============================================================
Coverage 0.00% 0.00%
===============================================================
Files 158 158
Lines 24658 24863 +205
===============================================================
- Misses 24658 24863 +205 ☔ 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 and observed evidence
This stacked PR now closes two addon-side parts of the MariaDB switchover contract.
1. Explicit candidates can converge after the action budget
Two independent runs showed the same shape:
rc=1first.rc=1.Evidence strength is 11.4.5 N=1 plus 11.4.8 N=1. It is not a frequency claim.
2. A second request must not preempt an unfinished DCS switchover
In the fresh r7 failure, syncer prepared and promoted the candidate at 07:20:58, but the addon saw
secondaryfor 28 polls and Stage 5 returnedrc=1. The first authoritative lease refresh appeared at 07:25:45 and the database write commit at 07:25:48.The old addon always passed
syncerctl switchover --force. That allowed a later request to delete an unfinished marker without proving that the previous lease, database, or grant changes had rolled back.This evidence proves the circular completion timing at the old exact. It does not prove the new addon exact or the companion syncer patch at runtime.
Behavior changes
Candidate-mode completion
convergence=delegated. The exact KubeBlocks controller keeps the OpsRequest Processing until that named candidate reports the expected role.convergence=observed. An empty CandidateName has no controller-side named-candidate role gate.The internal action deadline remains 50 seconds under the 60-second ComponentDefinition timeout.
Non-preemptive in-flight handling
--forcefrom both realsyncerctl switchoverinvocations.SWITCHOVER_IN_PROGRESSresponse tooutcome=retryable_conflict mutation=0.outcome=indeterminate_dcs_in_progress mutation=remote-partial; keep the old primary fenced.TDD and independent review
git diff --check, Helm lint and default render: PASS.Magnus independently fetched exact
44e415d930484146f5e7a61cecfa12b48fc50b80, reproduced focused 215/0/6, reproduced genuine base-script × new-spec RED 215/4, restored the head to 215/0/6, and reran the full 803/0/9 suite. Verdict: GREEN / CONFORMANT to design v3.Review focus
Please focus on:
mutation=0), unknown persistence (uncertain-DCS fence), and accepted-DCS but unproven terminal truth (remote-partial).Current boundary and merge order
44e415d930484146f5e7a61cecfa12b48fc50b80.8f1fcd78ffa564c8e356a8fc3b5f9c786a1bdeae.Design v3 SHA256:
24a2130cab43c6d401f75be4a2939ed0d30956a117bfbcdbe7eaa08f7a96f1d6.