-
Notifications
You must be signed in to change notification settings - Fork 165
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
raft: next index shall be larger than match index. #149
Conversation
5015245
to
d021d56
Compare
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 % a couple minor things
d021d56
to
3637abd
Compare
@joshuazh-x Thanks for the fix. @ahrtr Could you review/merge? Thank you. |
LGTM with one nit. Confirmed that the test case will fail without the fix.
Probably we should add an invariant check each time when sending a MsgApp message to ensure that the index should always be greater than the Match. It can be addressed in a separate PR. |
3637abd
to
1d00042
Compare
Please rebase this PR although github doesn't show any conflict. |
Leader shall always replicate its log from a index larger than corresponding match index. Note that this is not a correctness issue, but rather an optimization in case of message reordering. Signed-off-by: Joshua Zhang <[email protected]>
1d00042
to
6439482
Compare
done. |
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
Thanks
Leader shall always replicate its log from a index larger than corresponding match index. Note that this is not a correctness issue, but rather an optimization in case of message reordering.
Related: #148