Skip to content

Commit

Permalink
fix: onSuccess hook to run after INSTANT (#1463)
Browse files Browse the repository at this point in the history
previously, no hooks would run after a successful INSTANT DDL,
which is an unexpected behavior.
  • Loading branch information
artemvovk authored Oct 31, 2024
1 parent 7c30fb0 commit a6ccd3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/logic/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ func (this *Migrator) Migrate() (err error) {
} else {
this.migrationContext.Log.Infof("Attempting to execute alter with ALGORITHM=INSTANT")
if err := this.applier.AttemptInstantDDL(); err == nil {
if err := this.hooksExecutor.onSuccess(); err != nil {
return err
}
this.migrationContext.Log.Infof("Success! table %s.%s migrated instantly", sql.EscapeName(this.migrationContext.DatabaseName), sql.EscapeName(this.migrationContext.OriginalTableName))
return nil
} else {
Expand Down

0 comments on commit a6ccd3f

Please sign in to comment.