Skip to content

fix(cdc): retry native and legacy-wire MO deadlocks - #32234

Merged
mergify[bot] merged 8 commits into
matrixorigin:mainfrom
ck89119:issue-32214-main
Nov 6, 2026
Merged

mergify[bot] merged 8 commits into
matrixorigin:mainfrom
ck89119:issue-32214-main

Conversation

@ck89119

@ck89119 ck89119 commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

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 ErrDeadLockDetected to 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:

  • The added scenarios fail against unmodified main; focused and CDC/frontend owning-package normal tests pass after the one-line fix.
  • Modified classifier statement coverage: 94.4%. Incremental golangci-lint 2.14.0 reports no issues.
  • CDC/frontend owning-package race tests pass. Complete-range replay, source-guard persistence/readmission, and target-setup admission each pass 100 focused race repetitions.

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.

@mergify mergify Bot added the kind/bug Something isn't working label Nov 5, 2026
@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Nov 5, 2026
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mergify

mergify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Merged into main as aeab878 at 16:50 UTC

1 h 33 min in the queue, 1 h 8 min of it CI.

So far

  • ✅ Entered the queue Fri 6 Nov, 15:17 · rule main · triggered by rule Automatic queue on approval for main
  • ✅ Passed · in place
  • ✅ Merged 16:50 · aeab878 · squash
3 merge conditions met
  • #review-threads-unresolved = 0 · required by GitHub branch protection
  • github-review-approved · required by GitHub branch protection
  • any of · required by GitHub branch protection:
    • check-success = CI Required
    • check-neutral = CI Required
    • check-skipped = CI Required

Times in UTC · dashboard · how the merge queue works

This branch was previously deployed

1 inactive deployment
ci — f0fa6054 Deployed Nov 6, 2026 by mergify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/S Denotes a PR that changes [10,99] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants