Skip to content

Commit a1e9c9d

Browse files
ajm188claude
andauthored
fix: add missing error check for WriteChangelogState in initiateApplier (#1623)
The WriteChangelogState call at line 1365 was missing error handling, which could cause the migration to fail silently if the changelog table was not properly created. This resulted in cryptic "Table doesn't exist" errors later in the migration process. All other calls to WriteChangelogState in the codebase properly check for errors. This change makes error handling consistent and provides clearer error messages when changelog table operations fail. Co-authored-by: Claude Sonnet 4.5 <[email protected]>
1 parent cc2dd7f commit a1e9c9d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/logic/migrator.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,9 @@ func (this *Migrator) initiateApplier() error {
13621362
return err
13631363
}
13641364
}
1365-
this.applier.WriteChangelogState(string(GhostTableMigrated))
1365+
if _, err := this.applier.WriteChangelogState(string(GhostTableMigrated)); err != nil {
1366+
return err
1367+
}
13661368
}
13671369

13681370
// ensure performance_schema.metadata_locks is available.

0 commit comments

Comments
 (0)