on noop operation, drop ghost table at end

This commit is contained in:
Shlomi Noach 2016-06-22 10:48:17 +02:00
parent 35752c931d
commit 5b20122957

View File

@ -1177,10 +1177,12 @@ func (this *Migrator) finalCleanup() error {
return err
}
if this.migrationContext.OkToDropTable && !this.migrationContext.TestOnReplica {
dropTableFunc := func() error {
return this.applier.dropTable(this.migrationContext.GetOldTableName())
if err := this.retryOperation(this.applier.DropOldTable); err != nil {
return err
}
if err := this.retryOperation(dropTableFunc); err != nil {
}
if this.migrationContext.Noop {
if err := this.retryOperation(this.applier.DropGhostTable); err != nil {
return err
}
}