Skip to content

Commit

Permalink
Always pause replication if we turn replicas first
Browse files Browse the repository at this point in the history
  • Loading branch information
secwall committed Sep 5, 2024
1 parent c4446e7 commit 271483f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/app/switchover.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (app *App) performSwitchover(shardState map[string]*HostState, activeNodes
return err
}
rs := shardState[host].ReplicaState
if rs == nil || !rs.MasterLinkState {
if (rs == nil || !rs.MasterLinkState) && !app.config.Redis.TurnBeforeSwitchover {
app.logger.Info(fmt.Sprintf("Switchover: skipping replication pause on %s", host))
return nil
}
Expand Down

0 comments on commit 271483f

Please sign in to comment.