File-position checkpoints can point inside a transaction, causing --resume to fail with a missing TABLE_MAP error
Maintainer antworten meist innerhalb von 10 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 68/100
Rechercherichtung
Start in go/logic/migrator.go at Checkpoint() and resume handling, then trace currentCoordinates, LastTrxCoords, and StartSync() in go/binlog/gomysql_reader.go. Reproduce the file-position checkpoint scenario described in the issue and verify that checkpoints use a restartable transaction boundary while preserving preceding DML, allowing --resume to avoid the missing TABLE_MAP error.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Using gh-ost v1.1.11 (2ed192cd39d8a5173b6ef7c4beaa746a2d3bf1aa) on Aurora MySQL 8.0 with binlog_format=ROW, without --gtid.
After running with --checkpoint --execute, stopping the process, and restarting with --resume, binlog streaming repeatedly fails with:
StreamEvents encountered unexpected error:
... invalid table id, no corresponding table map event
The streamer repeatedly reconnects at the same position. Row copying can reach 100%, but binlog processing remains stuck.
Evidence
The following is an actual checkpoint and surrounding binlog events, with database/table names anonymized and irrelevant columns omitted. Numeric positions are unchanged.
mysql> SELECT gh_ost_chk_id, gh_ost_chk_coords, gh_ost_is_cutover
FROM app_db._table_a_ghk;
gh_ost_chk_id: 1
gh_ost_chk_coords: mysql-bin-changelog.001644:98771662
gh_ost_is_cutover: 0
mysql> SHOW BINLOG EVENTS
IN 'mysql-bin-changelog.001644' FROM 98746801 LIMIT 10;
Pos Event_type End_log_pos Info
98746801 Anonymous_Gtid 98746886 SET @@SESSION.GTID_NEXT='ANONYMOUS'
98746886 Query 98746991 BEGIN
98746991 Table_map 98747104 table_id: 5131 (app_db._other_table_gho; another concurrent migration)
98747104 Write_rows 98755290 table_id: 5131
98755290 Write_rows 98763476 table_id: 5131
98763476 Write_rows 98771662 table_id: 5131
98771662 Write_rows 98779848 table_id: 5131 <-- saved checkpoint
98779848 Write_rows 98786279 table_id: 5131 flags: STMT_END_F
98786279 Xid 98786310 COMMIT
98786310 Anonymous_Gtid 98786395 SET @@SESSION.GTID_NEXT='ANONYMOUS'
The checkpoint points to a Write_rows event after its required Table_map, rather than a transaction boundary.
Suspected cause
Checkpoint()savesGetCurrentBinlogCoordinates()asLastTrxCoords.
- In file-position mode,
currentCoordinatesadvances on every event, including intermediate row events.
- Resume loads the saved coordinates and passes that position directly to
StartSync(). The new reader therefore lacks the preceding table map.
The reader separately tracks completed transactions in LastTrxCoords on XID events, but checkpoint creation does not use that value.
Expected behavior
File-position checkpoints should store a restartable transaction boundary, while ensuring all preceding DML has been applied, so --resume can continue.
- 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
-
`--resume` without `--execute` drops the ghost table it correctly skipped alteringEvtl. vergeben @ajm188 hat das vor 56 Tagen übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 10 Tagen
-
[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
Ä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