Skip to content

Commit

Permalink
fix: onSuccess hook to run after INSTANT
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 committed Oct 29, 2024
1 parent 7c30fb0 commit e9f1b10
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 e9f1b10

Please sign in to comment.