Skip to content

Commit 85d6883

Browse files
author
Shlomi Noach
committed
printing migration status on waitForEventsUpToLock()
1 parent 96bc380 commit 85d6883

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

go/logic/migrator.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func (this *Migrator) Migrate() (err error) {
350350
log.Infof("Row copy complete")
351351
this.printStatus()
352352

353-
if err := this.stopWritesAndCompleteMigration(); err != nil {
353+
if err := this.cutOver(); err != nil {
354354
return err
355355
}
356356

@@ -361,9 +361,9 @@ func (this *Migrator) Migrate() (err error) {
361361
return nil
362362
}
363363

364-
// stopWritesAndCompleteMigration performs the final step of migration, based on migration
364+
// cutOver performs the final step of migration, based on migration
365365
// type (on replica? bumpy? safe?)
366-
func (this *Migrator) stopWritesAndCompleteMigration() (err error) {
366+
func (this *Migrator) cutOver() (err error) {
367367
if this.migrationContext.Noop {
368368
log.Debugf("Noop operation; not really swapping tables")
369369
return nil
@@ -432,6 +432,7 @@ func (this *Migrator) waitForEventsUpToLock() (err error) {
432432
waitForEventsUpToLockDuration := time.Now().Sub(waitForEventsUpToLockStartTime)
433433

434434
log.Infof("Done waiting for events up to lock; duration=%+v", waitForEventsUpToLockDuration)
435+
this.printMigrationStatusHint()
435436
this.printStatus()
436437

437438
return nil
@@ -575,7 +576,6 @@ func (this *Migrator) stopWritesAndCompleteMigrationOnReplica() (err error) {
575576

576577
this.waitForEventsUpToLock()
577578

578-
this.printMigrationStatusHint()
579579
log.Info("Table duplicated with new schema. Am not touching the original table. Replication is stopped. You may now compare the two tables to gain trust into this tool's operation")
580580
return nil
581581
}

0 commit comments

Comments
 (0)