From a6ccd3feaf938124ecf80c58de0d43a654203894 Mon Sep 17 00:00:00 2001 From: Artem Vovk <53193260+artemvovk@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:51:27 -0600 Subject: [PATCH] fix: onSuccess hook to run after INSTANT (#1463) previously, no hooks would run after a successful INSTANT DDL, which is an unexpected behavior. --- go/logic/migrator.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/logic/migrator.go b/go/logic/migrator.go index 2996ac642..b6bf3fc5e 100644 --- a/go/logic/migrator.go +++ b/go/logic/migrator.go @@ -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 {