Skip to content

Commit

Permalink
Do not psync replicas if new primary has not paused replication
Browse files Browse the repository at this point in the history
  • Loading branch information
secwall committed Sep 5, 2024
1 parent 3177fb4 commit 9e0e92f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/app/switchover.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ func (app *App) performSwitchover(shardState map[string]*HostState, activeNodes
if host == newMaster {
continue
}
if !shardState[newMaster].IsReplPaused {
app.logger.Warn(fmt.Sprintf("Unable to psync %s before promote: replication on new master is not paused", host))
continue
}
if isPartialSyncPossible(shardState[host], shardState[newMaster]) {
psyncNodes = append(psyncNodes, host)
}
Expand Down

0 comments on commit 9e0e92f

Please sign in to comment.