Repository navigation
fix(cdc): retry native and legacy-wire MO deadlocks - #32234
Merged
Merged
Conversation
ck89119
marked this pull request as ready for review
November 5, 2026 07:38
ck89119
requested review from
XuPeng-SH,
aptend and
jiangxinmeng1
as code owners
November 5, 2026 07:38
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Contributor
✅ Merged into
|
2 of 4 tasks
This branch was previously deployed
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.
What type of PR is this?
Which issue(s) this PR fixes:
Related to #32214
What this PR does / why we need it:
Main already preserves typed target errors, replays complete failed transactions, and exposes new target deadlocks as MySQL 1213/40001. However, the shared CDC classifier still misses native and legacy-wire MO deadlock code 20701. These errors can lose their driver identity, be persisted as non-retryable, and prevent automatic recovery.
Add
ErrDeadLockDetectedto the existing transient classification. Extend existing tests for native/both drivers, wrapped/unwrapped errors, cause preservation, complete snapshot/incremental replay, and source/target admission through the owned diagnostic writer and subsequent catalog read. Cancellation and owner-loss precedence, permanent errors, and existing retry budgets remain unchanged.This is the minimal main counterpart to #32232, not a cherry-pick of the broader 4.2-dev repair. No wire mapping, catalog, ownership protocol, or transaction state-machine changes are included.
Validation on Darwin/arm64 with Go 1.27.1:
Merged the latest main update (BETWEEN selectivity only) and reran both owning packages normally plus lint. Race and coverage evidence is reused for the unchanged CDC contract.
No new cluster fixture or mo-tester BVT was added. Real DN chaos and historical
N:task recovery remain outside this change.