Skip to content

Commit a6ccd3f

Browse files
authored
fix: onSuccess hook to run after INSTANT (#1463)
previously, no hooks would run after a successful INSTANT DDL, which is an unexpected behavior.
1 parent 7c30fb0 commit a6ccd3f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: go/logic/migrator.go

+3
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,9 @@ func (this *Migrator) Migrate() (err error) {
367367
} else {
368368
this.migrationContext.Log.Infof("Attempting to execute alter with ALGORITHM=INSTANT")
369369
if err := this.applier.AttemptInstantDDL(); err == nil {
370+
if err := this.hooksExecutor.onSuccess(); err != nil {
371+
return err
372+
}
370373
this.migrationContext.Log.Infof("Success! table %s.%s migrated instantly", sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName))
371374
return nil
372375
} else {

0 commit comments

Comments
 (0)