Skip to content

Add cluster.SetSugarState#328

Closed
terwey wants to merge 7 commits intosignal18:developfrom
terwey:sugarstate
Closed

Add cluster.SetSugarState#328
terwey wants to merge 7 commits intosignal18:developfrom
terwey:sugarstate

Conversation

@terwey
Copy link
Collaborator

@terwey terwey commented Feb 23, 2021

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 terwey changed the base branch from 2.1 to develop February 23, 2021 09:56
@terwey terwey changed the title [WIP] Add cluster.SetSugarState Add cluster.SetSugarState Feb 23, 2021
@svaroqui
Copy link
Collaborator

svaroqui commented Mar 2, 2021

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

@tanji tanji closed this Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants