-
Notifications
You must be signed in to change notification settings - Fork 399
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
Joint Consensus #101
Merged
Merged
Joint Consensus #101
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hoverbear
added
Work In Progress
A work in progress.
Do Not Merge
A blocked PR. Please do not merge it.
labels
Aug 8, 2018
Hoverbear
force-pushed
the
joint-consensus
branch
10 times, most recently
from
August 14, 2018 22:48
7b72667
to
6cc0019
Compare
Hoverbear
force-pushed
the
joint-consensus
branch
from
August 24, 2018 18:10
8f4e0aa
to
f40d8fa
Compare
This was referenced Sep 12, 2018
Hoverbear
force-pushed
the
joint-consensus
branch
4 times, most recently
from
September 21, 2018 19:54
e16a630
to
d6986d9
Compare
Hoverbear
force-pushed
the
joint-consensus
branch
3 times, most recently
from
September 26, 2018 02:19
abbbe66
to
b98e5a5
Compare
hicqu
reviewed
Jan 22, 2019
nolouch
reviewed
Jan 28, 2019
Signed-off-by: qupeng <qupeng@pingcap.com>
PTAL again pre-merge. Please pay particular attention to documentation. |
Merged
nolouch
approved these changes
Feb 14, 2019
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
hicqu
approved these changes
Feb 14, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enables Joint Consensus as described by the Raft paper (https://raft.github.io/raft.pdf).
As of this commit it is possible to undergo arbitrary peer membership changes in a safe way.
Notably, this gives us a resilient "Replace Node" functionality, which is able to progress in the situation of a loss of both the old (removed) and new (added) peers go down. This is not possible with our previous one-at-a-time strategy.
Unfortunately, this feature is fairly large in scope. Thankfully it's mostly testing code!
There is some new API surface, notably the
Raft::begin_membership_change
function.There is also some moved API surface. The
RaftLog::applied_to
function has been moved toRaft::commit_apply
. The old function, while it still works, carries a deprection warning. In the future we should make it a function available to onlyRaft::applied_to
.Several APIs have changed to return errors instead of panic or otherwise ignore non-critical errors. In most cases you can just do
old_call().ok()
to have the same behavior.Then, in order to facilitate the needs in testing, some additional API was added to the
Network
harness, which now can dispatch messages and not automatically send responses, allowing time to inspect the state of peers.Finally, many tests were added to ensure Joint Consensus can work.