Skip to content

Commit

Permalink
*: Add ability to disable sync replication when there're not enough r…
Browse files Browse the repository at this point in the history
…eady standbys
  • Loading branch information
warpcomdev committed Sep 15, 2021
1 parent 057389f commit e48f9a4
Show file tree
Hide file tree
Showing 7 changed files with 907 additions and 74 deletions.
2 changes: 1 addition & 1 deletion cmd/sentinel/cmd/sentinel.go
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ func (s *Sentinel) updateCluster(cd *cluster.ClusterData, pis cluster.ProxiesInf
newMasterDB.Spec.SynchronousStandbys = append(newMasterDB.Spec.SynchronousStandbys, oldMasterdb.UID)
}
}
if len(newMasterDB.Spec.SynchronousStandbys) == 0 {
if len(newMasterDB.Spec.SynchronousStandbys) == 0 && *clusterSpec.MinSynchronousStandbys > 0 {
newMasterDB.Spec.ExternalSynchronousStandbys = []string{fakeStandbyName}
}

Expand Down
Loading

0 comments on commit e48f9a4

Please sign in to comment.