`--resume` without `--execute` drops the ghost table it correctly skipped altering
Maintainer antworten meist innerhalb von 10 Tagen
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 86/100
Rechercherichtung
Beginne in go/logic/migrator.go bei finalCleanup und verfolge den Noop- und Resume-Zustand während der dokumentierten Checkpoint- und Resume-Sequenz. Führe nach einer unterbrochenen Execute-Migration einen Resume-Dry-Run durch und überprüfe anschließend, dass die vorhandene Ghost-Tabelle für einen späteren --resume --execute-Lauf weiterhin verfügbar ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Description
Running a checkpoint/resume migration with gh-ost --resume but without --execute
(i.e. a dry-run resume) correctly skips re-applying the ALTER to the ghost table, but
finalCleanup still drops the ghost table at the end, destroying the progress from the
interrupted real migration.
Steps to reproduce
- Start a migration with
--checkpointand--execute. - Interrupt it partway through row copy.
- Resume with
--resumebut omit--execute(dry-run resume). - Observe the ghost table is dropped even though no data was copied or altered in this run.
Expected behavior
A dry-run resume should not destroy the ghost table produced by the previous real run,
since it did none of the work that produced it and a subsequent --resume --execute
should still be able to use it.
Root cause
In finalCleanup (go/logic/migrator.go), the ghost table drop is gated only on
migrationContext.Noop, not on whether this is a resume:
if mgtr.migrationContext.Noop {
mgtr.applier.DropGhostTable()
}
This doesn't account for Resume=true, where the ghost table was not created by
this invocation and represents real, previously-copied data.
Workaround
Skip the dry-run resume step; go straight to --resume --execute.
- Vorherrschende Sprache
- Go
- Sterne
- 13.6k
- Forks
- 1.4k
- Ø Merge
- 9 T. 19 Std.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/gh-ost
-
[Suggestion] Apply simple validation to alter commandEvtl. vergeben @drkemp187 hat das vor 106 Tagen übernommen. Offenenhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
github/gh-ost#1431 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 10 Tagen
-
Migration hangs when --attempt-instant-ddl succeedsEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
Maintainer antworten meist innerhalb von 10 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
Maintainer antworten meist innerhalb von 10 Tagen
-
Atomic cut-over always fails on MySQL 9.1+: information_schema.processlist errors out (3854) while another session runs a non-BMP utf8mb4 statementEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
github/gh-ost#1780 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 10 Tagen
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 10 Tagen
Ähnliche Issues
-
[Docs] Four internal links return 404 (Models concept, Contributing to Docs, Providers reference)Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
meshery/meshery#23520 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
flaky: execenv TestRelayControlledCancelAndDirectParentDeath reads an empty pid file under loadOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
SocialGouv/iterion#3263 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Container registry refuses image names with "__" or "--" (NAME_INVALID), which the OCI distribution spec allows since v1.1.0Evtl. vergeben @lazerg hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
itadori26/trisse-home#226 ·
Maintainer antworten meist innerhalb von 1 Tag