replication: fix updating is_candidate in raft
Currently on applier death `is_candidate` is updated after trying to start election. So, raft assumes it has healthy quorum and bumps term even when there's not enough healthy nodes to do that. Trigger on updating above-mentioned flag is run in `replicaset_on_health_change`. So, let's move it before executing `raft_notify_is_leader_seen`, which tries to start election. Closes #8433 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-8433-raft-is-candidate.md 4 additions, 0 deletionschangelogs/unreleased/gh-8433-raft-is-candidate.md
- src/box/replication.cc 15 additions, 7 deletionssrc/box/replication.cc
- test/replication-luatest/gh_8433_raft_is_candidate_test.lua 115 additions, 0 deletionstest/replication-luatest/gh_8433_raft_is_candidate_test.lua
Loading
Please register or sign in to comment