Skip to content
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

Fix to precommit/commit order inversion bug #108

Merged
merged 1 commit into from
Mar 6, 2020

Conversation

greensky00
Copy link
Contributor

  • Since peer::set_free() is called prior than response handler
    without acquiring raft_server::lock_, there can be an edge case
    that leader may send duplicate logs, and their last log index may not
    be greater than the last log index this server already has. We should
    always compare the target index with current precommit index, and take
    it only when it is greater than the previous one.

* Since `peer::set_free()` is called prior than response handler
without acquiring `raft_server::lock_`, there can be an edge case
that leader may send duplicate logs, and their last log index may not
be greater than the last log index this server already has. We should
always compare the target index with current precommit index, and take
it only when it is greater than the previous one.
@greensky00 greensky00 merged commit 972f02d into eBay:master Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant