-
Notifications
You must be signed in to change notification settings - Fork 77
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
Step down if local_put fails in leader worker #27
Conversation
Fixes #2 |
/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. |
@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.
👍 8f6efad |
Step down if local_put fails in leader worker Reviewed-by: andrewjstone
@borshop merge |
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/4
whenlocal_put/4
fails, step down bysending a
request_failed
message to the leader.