Skip to content

Commit

Permalink
set master online on switchover: phase 5
Browse files Browse the repository at this point in the history
  • Loading branch information
suetin committed Mar 19, 2024
1 parent 62a430a commit 71f4403
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1275,6 +1275,10 @@ func (app *App) performSwitchover(clusterState map[string]*NodeState, activeNode

// turn slaves to the new master
app.logger.Info("switchover: phase 5: turn to the new master")
err = app.cluster.Get(newMaster).SetOnline()
if err != nil {
return fmt.Errorf("got error on setting new master %s online %v", newMaster, err)
}
errs = util.RunParallel(func(host string) error {
if host == newMaster || !clusterState[host].PingOk {
return nil
Expand Down

0 comments on commit 71f4403

Please sign in to comment.