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 <844740374@qq.com>
Signed-off-by: wego1236 <844740374@qq.com>
|
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 <844740374@qq.com>
|
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.
| let _ = expect_one_message(&mut r1); |
You may need to remove this line.
There was a problem hiding this comment.
thanks a lot, i'll fix it now
…ve the purpose. Signed-off-by: wego1236 <844740374@qq.com>
…d automatically due to some plugins and are now reverted to their original versions Signed-off-by: wego1236 <844740374@qq.com>
Signed-off-by: wego1236 <844740374@qq.com>
|
Is there anything else I need to do? |
|
@BusyJay PTAL |
|
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