Step down if local_put fails in leader worker#27
Merged
Conversation
Contributor
Author
|
Fixes #2 |
21 tasks
Contributor
|
/cc basho/riak#536 |
|
Had to rebase to get ee to compile. ensemble develop introduced a type that does not exist in this branch. riak_test run: First run had sync, remove_node2, and remove_node all fail. Running them individually had them pass, and 2nd run with all ensemble tests passed. Code is nicely contained. I'll run the ensemble suite a couple more times to see if the failure can be replicated. |
|
👍 02ee10c At least one test will timeout when running the suite, but each test will pass individually, so I don't think the changes in this pr are responsible for that. Since that was the only concern, this is ready for merging. |
Contributor
Author
|
@borshop merge |
In riak_ensemble_peer:put_obj/4 when local_put/4 fails, step down by sending a 'request_failed' message to the leader.
Contributor
Author
|
👍 8f6efad |
borshop
added a commit
that referenced
this pull request
Jun 24, 2014
Step down if local_put fails in leader worker Reviewed-by: andrewjstone
Contributor
Author
|
@borshop merge |
This file contains hidden or 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
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.
If we fail to write locally as a leader, we cannot get a valid quorum since those quorums include the leader. Therefore we need to step down to prevent committing unsafely.
In
riak_ensemble_peer:put_obj/4whenlocal_put/4fails, step down bysending a
request_failedmessage to the leader.