-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Check whether the leader is valid #358
Comments
no need, the leader can't do any write/read successfully |
However, in the 3B test, I encountered a situation: The old leader is partitioned by the network, but it does not stop the leadership and will continue to send heartbeat to PD Newleader will also send heartbeat to PD This causes the cache in PD to change constantly, which slows down the performance of the system, and log replication becomes very slow. I solved this problem by adding leader lease detection |
@Connor1996 pelease cc https://asktug.com/t/topic/303079 |
Yes, it's a problem. In the implementation of tikv's raft-rs, it avoids by leader checking quorum and stepping down if the quorum is not active. But no need to consider it in tinykv for simplicity. |
When a network partition occurs, if there is only the leader node in a partition, it will not stepdown.
Therefore, should the logic of checking leader stepdown be added to make the leader stepdown when a network partition occurs
The text was updated successfully, but these errors were encountered: