Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new test hits a known instant-DDL deadlock on the current base, causing CI to time out before cleanup assertions or remaining tests can run; the deadlock fix must be incorporated before merging.
1 open issue
What changed in this PR
Fixes #1773 by removing the unused ghost table after a successful instant DDL migration.
Changes:
- Drops
_ghowith retry handling before final cleanup on the instant-DDL success path. - Adds a regression test checking the added column and removal of both
_ghoand_ghc.
| File | Description |
|---|---|
go/logic/migrator.go |
Adds ghost-table cleanup after successful instant DDL. |
go/logic/migrator_test.go |
Adds coverage for instant-DDL table cleanup. |
Review effort: Balanced (auto)
|
Thanks for the review, and good catch. I reproduced it: on this branch alone, The change in |
When --attempt-instant-ddl succeeds, the ghost table that was created and altered by initiateApplier is never swapped in, but finalCleanup only drops it on --noop. The _gho table was left behind on every successful instant migration. Drop the ghost table on the instant path before finalCleanup. Fixes github#1773
24a7f92 to
374ec90
Compare
|
Hi, thanks for your time. I rebased this onto the current master and reworked the test. The test calls With the fix, the test passes in about 0.25s. With the Happy to open a separate issue or PR for the |

Related issue: #1773
Description
This PR drops the
_ghotable when--attempt-instant-ddlsucceeds.initiateAppliercreates and alters the ghost table beforeMigrate()tries the instant DDL. When the instantALTERworks, the ghost table is never swapped in, andfinalCleanup()only drops it on--noop, so_ghowas left behind after every successful instant migration. The fix drops it on the instant path, withretryOperationlike the other cleanup steps, beforefinalCleanup().It adds
TestMigrateInstantDDLDropsGhostTable, which runs an instant migration and checks that both_ghoand_ghcare gone.Note on testing: on current
masterthe instant DDL path hangs (#1795), so the new test times out there before reaching its assertions. I verified this change on top of #1796:_ghocheck;TestMigratorsuite passes (go test -run TestMigrator ./go/logic, MySQL 8.0.42 via testcontainers);gofmt -l,go vet ./go/logicandgo build ./...are clean.The change itself does not touch the code #1796 changes, so the two merge independently; this PR's CI will hang until #1796 lands. Happy to rebase once it does.
script/cibuildreturns with no formatting errors, build errors or unit test errors (verified on top of Do not deadlock when instant DDL completes the migration #1796, see above).