From 5b2012295739fec2970a67c357630374ad770876 Mon Sep 17 00:00:00 2001 From: Shlomi Noach Date: Wed, 22 Jun 2016 10:48:17 +0200 Subject: [PATCH] on noop operation, drop ghost table at end --- go/logic/migrator.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/go/logic/migrator.go b/go/logic/migrator.go index 00ce4ce..1c103f0 100644 --- a/go/logic/migrator.go +++ b/go/logic/migrator.go @@ -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 } }