-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Quorum raft upgrade v3.3.13 #887
Conversation
fix learner node changing to voter node when network restarted
…d-upgrade # Conflicts: # vendor/github.com/coreos/etcd/raft/raft.go
add --raftlearner flag to geth to specify node type when joining
remove debug log statements
…ly when it joins cluster first time and remove my fixes for the same
…becoming a learner
…pgrade # Conflicts: # raft/handler.go
…during snapshot restore
….3.13) package. This is based on the same convention followed by previous version(3.1.0)
allow raft learner node to call removePeer if raftId to be removed is its own raftId update raft.cluster api to show minter instead of leader update raft consensus documentation code improvements
…-upgrade-v3.3.13 # Conflicts: # raft/handler.go # raft/peer.go
Wondering how has this been tested? |
When a new node joins the network as a peer, it tries to sync with leader and during this time the leader is overloaded and can potentially lead to periods of cluster unavailability. Please refer to https://github.com/etcd-io/etcd/blob/master/Documentation/learning/design-learner.md for further details on various scenarios. The advantage of a learner node is it joins the network as a non voting member and hence does not impact the Raft quorum. |
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.
When a node is learner and it calls raft.removePeer()
on itself, it returns null. When checking raft.cluster
the node is still seen with a verifier
role. Running raft.role
returns an empty string. Running raft.cluster
from any other node returns correct results though
…at removed itself from raft cluster
… when restores snapshot'
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.
LGTM
this has been fixed now. after a learner/peer node removes itself it will return an empty array when |
1. let raft step return error when proposal is dropped to allow fail-fast 2. Propose in raft node wait the proposal result so we can fail fast while dropping proposal
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.
LGTM. Changes in the original etcd raft library:
- Inject a channel to capture role change:
roleC
- Populate
ConfState
to separate voters and learners, similar to raft: raft learners should be returned after applyConfChange by absolute8511 · Pull Request #9116 · etcd-io/etcd
This PR contains the following changes to Raft consensus:
#825, #790, #852, #180