@@ -8,7 +8,6 @@ package logic
8
8
import (
9
9
gosql "database/sql"
10
10
"fmt"
11
- "sync"
12
11
"sync/atomic"
13
12
"time"
14
13
@@ -834,7 +833,7 @@ func (this *Applier) CreateAtomicCutOverSentryTable() error {
834
833
}
835
834
836
835
// AtomicCutOverMagicLock
837
- func (this * Applier ) AtomicCutOverMagicLock (sessionIdChan chan int64 , tableLocked chan <- error , okToUnlockTable <- chan bool , tableUnlocked chan <- error , dropCutOverSentryTableOnce * sync. Once ) error {
836
+ func (this * Applier ) AtomicCutOverMagicLock (sessionIdChan chan int64 , tableLocked chan <- error , okToUnlockTable <- chan bool , tableUnlocked chan <- error ) error {
838
837
tx , err := this .db .Begin ()
839
838
if err != nil {
840
839
tableLocked <- err
@@ -912,13 +911,10 @@ func (this *Applier) AtomicCutOverMagicLock(sessionIdChan chan int64, tableLocke
912
911
sql .EscapeName (this .migrationContext .DatabaseName ),
913
912
sql .EscapeName (this .migrationContext .GetOldTableName ()),
914
913
)
915
-
916
- dropCutOverSentryTableOnce .Do (func () {
917
- if _ , err := tx .Exec (query ); err != nil {
918
- this .migrationContext .Log .Errore (err )
919
- // We DO NOT return here because we must `UNLOCK TABLES`!
920
- }
921
- })
914
+ if _ , err := tx .Exec (query ); err != nil {
915
+ this .migrationContext .Log .Errore (err )
916
+ // We DO NOT return here because we must `UNLOCK TABLES`!
917
+ }
922
918
923
919
// Tables still locked
924
920
this .migrationContext .Log .Infof ("Releasing lock from %s.%s, %s.%s" ,
0 commit comments