Skip to content

Commit

Permalink
Merge pull request #841 from warpcomdev/feature/strict_sync_repl
Browse files Browse the repository at this point in the history
Add ability to disable sync replication when there're not enough ready standbys.
  • Loading branch information
sgotti committed Sep 16, 2021
2 parents d743ed5 + e48f9a4 commit fc23394
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 fc23394

Please sign in to comment.