提交 6ecf21c6 编写于 作者: P Philipp Heckel

Revert "Add WaitForSemiSyncRecoverySeconds config option"

This reverts commit 5382128e.
上级 ec7aab64
......@@ -277,8 +277,7 @@ type Configuration struct {
MaxConcurrentReplicaOperations int // Maximum number of concurrent operations on replicas
EnforceExactSemiSyncReplicas bool // If true, semi-sync replicas will be enabled/disabled to match the wait count in the desired priority order; this applies to LockedSemiSyncMaster and MasterWithTooManySemiSyncReplicas
RecoverLockedSemiSyncMaster bool // If true, orchestrator will recover from a LockedSemiSync state by enabling semi-sync on replicas to match the wait count; this behavior can be overridden by EnforceExactSemiSyncReplicas
ReasonableLockedSemiSyncMasterSeconds uint // Time to evaluate the LockedSemiSyncHypothesis before triggering the LockedSemiSyncMaster analysis; defaults to ReasonableReplicationLagSeconds if not set
WaitForSemiSyncRecoverySeconds uint // Time to wait for a successful recovery of LockedSemiSyncMaster or MasterWithTooManySemiSyncReplicas before considering the recovery failed; defaults to InstancePollSeconds * 3 if not set
ReasonableLockedSemiSyncMasterSeconds uint // Time to evaluate the LockedSemiSyncHypothesis before triggering the LockedSemiSync analysis; falls back to ReasonableReplicationLagSeconds if not set
}
// ToJSONString will marshal this configuration as JSON
......@@ -453,7 +452,6 @@ func newConfiguration() *Configuration {
EnforceExactSemiSyncReplicas: false,
RecoverLockedSemiSyncMaster: false,
ReasonableLockedSemiSyncMasterSeconds: 0,
WaitForSemiSyncRecoverySeconds: 0,
}
}
......@@ -619,9 +617,6 @@ func (this *Configuration) postReadAdjustments() error {
if this.ReasonableLockedSemiSyncMasterSeconds == 0 {
this.ReasonableLockedSemiSyncMasterSeconds = uint(this.ReasonableReplicationLagSeconds)
}
if this.WaitForSemiSyncRecoverySeconds == 0 {
this.WaitForSemiSyncRecoverySeconds = this.InstancePollSeconds * 3
}
return nil
}
......
......@@ -1548,7 +1548,7 @@ func recoverSemiSyncReplicas(topologyRecovery *TopologyRecovery, analysisEntry i
// Wait for replica count to match desired wait count (this is what triggers the recovery)
AuditTopologyRecovery(topologyRecovery, "semi-sync: waiting for desired state:")
success := false
for i := uint(0); i < config.Config.WaitForSemiSyncRecoverySeconds; i++ {
for i := 0; i < 10; i++ {
masterInstance, err = inst.ReadTopologyInstance(&analysisEntry.AnalyzedInstanceKey)
if err != nil {
return true, topologyRecovery, fmt.Errorf("error re-reading master instance: %s", err.Error())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册