Merge pull request #79 from github/noop-drop-ghost

on noop operation, drop ghost table at end
This commit is contained in:
Shlomi Noach 2016-06-22 10:49:21 +02:00 committed by GitHub
commit 45625a6a6d

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
}
}