-
Notifications
You must be signed in to change notification settings - Fork 400
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 #557
Conversation
Thanks, seems the test case is missing. |
Do I need to add test here? |
You also need to port the test case from the original PR. |
This test case needs to be added to harness/tests/integreation_cases/test_raft.rs right? |
Yes. |
…alue to be less than or equal to the match value in the probe state Signed-off-by: wego1236 <[email protected]>
Signed-off-by: wego1236 <[email protected]>
I may need some help, the test case I wrote modelled after etcd doesn't achieve the same results as they do, this test case may need your help to complete it. When I tried it, I found that in some cases etcd and raft-rs produced different results, so I may not be able to simply copy the corresponding test cases. |
Signed-off-by: wego1236 <[email protected]>
I'm not familiar with rust, maybe for me this test case needs to know a bit too much, if it's easier for you, could you help me to modify it a bit |
assert_eq!(m.reject, false); | ||
assert_eq!(m.index, 2); | ||
let _ = r1.step(m); | ||
let _ = expect_one_message(&mut r1); |
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.
let _ = expect_one_message(&mut r1); |
You may need to remove this line.
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.
thanks a lot, i'll fix it now
…ve the purpose. Signed-off-by: wego1236 <[email protected]>
…d automatically due to some plugins and are now reverted to their original versions Signed-off-by: wego1236 <[email protected]>
Signed-off-by: wego1236 <[email protected]>
Is there anything else I need to do? |
@BusyJay PTAL |
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
Thank you! |
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: #555