-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds in-place manual recovery support. #140
Conversation
a13969d
to
f75a881
Compare
83c1730
to
0a36b7f
Compare
Thinking through how I did |
Type: LogConfiguration, | ||
Data: encodeConfiguration(configuration), | ||
} | ||
if conf.ProtocolVersion < 1 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would you ever want to bootstrap a new cluster with version 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During the phase where we are transitioning to protocol version 1 but have set it to 0, we may not want to have this new entry in the log in case an older server joins, since we are saying if protocol version == 0 that we are compatible with old servers.
I think @superfell and I had convinced ourselves that a running cluster would have the same information in its snapshot or log already, so we wouldn't need to ever read peers.json again. Was that just wishful thinking? :)
Assuming all the servers go through this procedure, the set of servers that are eligible to become leader would stay the same. So that's good. But I'm gonna need to think about this. |
I think since peer changes used to be stored in the log and snapshots so we could probably just delete peers.json in almost all cases and things would work fine. Consul had some places where it would manipulate this at startup, and if it's there it could also mean that the operator wants to mess with it so I'm planning in Consul to ingest it and then blow it away. I think for most normal use cases we could just delete it and things would work fine. I should put "truth" in quotes :-) |
b93db94
to
b4cb7e6
Compare
This adds several important capabilities to help in upgrading to the new Raft protocol version:
RecoverCluster
interface access to a completeConfiguration
object to consume. This will allow us to manually pick which server is a voter for manual elections (set 1 to a voter and the rest to nonvoters, the 1 voter will elect itself), as well as basically any other configuration we want to set.This is based on the branch in #139.