Skip to content

Commit 45625a6

Browse files
author
Shlomi Noach
authored
Merge pull request #79 from github/noop-drop-ghost
on noop operation, drop ghost table at end
2 parents 35752c9 + 5b20122 commit 45625a6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

go/logic/migrator.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,10 +1177,12 @@ func (this *Migrator) finalCleanup() error {
11771177
return err
11781178
}
11791179
if this.migrationContext.OkToDropTable && !this.migrationContext.TestOnReplica {
1180-
dropTableFunc := func() error {
1181-
return this.applier.dropTable(this.migrationContext.GetOldTableName())
1180+
if err := this.retryOperation(this.applier.DropOldTable); err != nil {
1181+
return err
11821182
}
1183-
if err := this.retryOperation(dropTableFunc); err != nil {
1183+
}
1184+
if this.migrationContext.Noop {
1185+
if err := this.retryOperation(this.applier.DropGhostTable); err != nil {
11841186
return err
11851187
}
11861188
}

0 commit comments

Comments
 (0)