-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: a Candidate should revert to Follower at once when a higher vote…
… is seen When a Candidate saw a higher vote, it store it at once. Then no more further granted votes are valid to this candidate, because vote they granted are changed. Thus it was wrong to compare `last_log_id` before decide if to revert to Follower. The right way is to revert to Follower at once and stop the voting procedure. The test `leader_metrics()` sometimes fails because of this bug.
- Loading branch information
1 parent
950d23b
commit 4015cc3
Showing
2 changed files
with
22 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters