Commit bc7ccc9
committed
fix(mts): retry NOWAIT lock failures and resolve contextcheck lint errors
Under concurrent MTS workers, MySQL 8.0 may return ER_LOCK_NOWAIT (3572)
when gap locks on the ghost table's secondary indexes conflict between
parallel statements. This was not classified as retryable, causing the
MTS worker to abort and cascade a migration failure.
Changes:
- Add errno 3572 (ER_LOCK_NOWAIT) to isRetryableApplyError alongside
existing 1205 (lock wait timeout) and 1213 (deadlock)
- Remove context.Background() fallback in ApplyDMLEventQueries; all
callers already pass a valid context (resolves contextcheck lint)
- Use the passed ctx parameter in applyMTSWorkerJob defer instead of
mgtr.migrationContext.GetContext() (resolves contextcheck lint)1 parent 8c0f999 commit bc7ccc9
2 files changed
Lines changed: 12 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
489 | 490 | | |
490 | 491 | | |
491 | 492 | | |
492 | 493 | | |
493 | 494 | | |
494 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
495 | 500 | | |
496 | 501 | | |
497 | 502 | | |
| |||
1816 | 1821 | | |
1817 | 1822 | | |
1818 | 1823 | | |
1819 | | - | |
1820 | | - | |
1821 | | - | |
1822 | 1824 | | |
1823 | 1825 | | |
1824 | 1826 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2130 | 2130 | | |
2131 | 2131 | | |
2132 | 2132 | | |
2133 | | - | |
| 2133 | + | |
2134 | 2134 | | |
2135 | 2135 | | |
2136 | 2136 | | |
| |||
0 commit comments