replication-manager icon indicating copy to clipboard operation
replication-manager copied to clipboard

Add cluster.SetSugarState

Open terwey opened this issue 4 years ago • 1 comments
trafficstars

Switch cluster.SetState to cluster.SetSugarState which reduces code complexity

Note: some States were before marked as WARNING while the Key was set to ERR

terwey avatar Feb 23 '21 02:02 terwey

This is critical to keep the level because of this func (SM *StateMachine) IsFailable() bool { SM.Lock() for _, value := range *SM.OldState { if value.ErrType == "ERROR" { SM.Unlock() return false } } SM.discovered = true SM.Unlock() return true }

The idea behind this is that there are errors for a server that do not really lead to errors at the cluster layer

A server can not be elected as a slave is a warning while it's an error for the server it not an issue for the cluster if an other server can be elected, so any lvlerr cancel the failover or the switchover cluster capability

svaroqui avatar Mar 02 '21 09:03 svaroqui