File tree Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Expand file tree Collapse file tree 2 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -568,15 +568,11 @@ func (this *Applier) StartSlaveSQLThread() error {
568
568
569
569
// StopReplication is used by `--test-on-replica` and stops replication.
570
570
func (this * Applier ) StopReplication () error {
571
- if this .migrationContext .TestOnReplicaSkipReplicaStop {
572
- log .Warningf ("--test-on-replica-skip-replica-stop enabled, we are not stopping replication." )
573
- } else {
574
- if err := this .StopSlaveIOThread (); err != nil {
575
- return err
576
- }
577
- if err := this .StopSlaveSQLThread (); err != nil {
578
- return err
579
- }
571
+ if err := this .StopSlaveIOThread (); err != nil {
572
+ return err
573
+ }
574
+ if err := this .StopSlaveSQLThread (); err != nil {
575
+ return err
580
576
}
581
577
582
578
readBinlogCoordinates , executeBinlogCoordinates , err := mysql .GetReplicationBinlogCoordinates (this .db )
Original file line number Diff line number Diff line change @@ -477,9 +477,14 @@ func (this *Migrator) cutOver() (err error) {
477
477
// the same cut-over phase as the master would use. That means we take locks
478
478
// and swap the tables.
479
479
// The difference is that we will later swap the tables back.
480
- log .Debugf ("testing on replica. Stopping replication IO thread" )
481
- if err := this .retryOperation (this .applier .StopReplication ); err != nil {
482
- return err
480
+
481
+ if this .migrationContext .TestOnReplicaSkipReplicaStop {
482
+ log .Warningf ("--test-on-replica-skip-replica-stop enabled, we are not stopping replication." )
483
+ } else {
484
+ log .Debugf ("testing on replica. Stopping replication IO thread" )
485
+ if err := this .retryOperation (this .applier .StopReplication ); err != nil {
486
+ return err
487
+ }
483
488
}
484
489
// We're merly testing, we don't want to keep this state. Rollback the renames as possible
485
490
defer this .applier .RenameTablesRollback ()
You can’t perform that action at this time.
0 commit comments