-
Notifications
You must be signed in to change notification settings - Fork 875
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
Unittest NodeTest.LeaderFailWithWitness is not stable. #445
Comments
Thanks for your report! We should temporarily disable followers' election before stop the leader to ensure that the raft group will be no-leader state for a period of time deterministically. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
NodeTest.LeaderFailWithWitness 测试用例:
braft/test/test_node.cpp
Lines 462 to 477 in b37c610
这段逻辑应该是 2 个 Replica 和一个 Witness 节点,当选出 leader 后,杀死leader,并用 follower 进行日志提交。
但是在这个 for 循环之前,有可能该 follower 已经成为 leader 了,导致 followers 的个数只有 1 个,使用 nodes[1] 会越界。
@lintanghui
The text was updated successfully, but these errors were encountered: