promote: abort it when become non-candidate
box.ctl.promote() bumps the term, makes the node a candidate, and waits for the term outcome. The waiting used to be until there is a leader elected or the node lost connection quorum or the term was bumped again. There was a bug that a node could hang in box.ctl.promote() even when became a voter. It could happen if the quorum was still there and a leader couldn't be elected in the current term at all. For instance, others could have `election_mode='off'`. The fix is to stop waiting for the term outcome if the node can't win anyway. NO_DOC=bugfix (cherry picked from commit ab08dad9)
Showing
- changelogs/unreleased/promote-hang.md 4 additions, 0 deletionschangelogs/unreleased/promote-hang.md
- src/box/raft.c 10 additions, 8 deletionssrc/box/raft.c
- test/replication-luatest/gh_6033_box_promote_demote_test.lua 40 additions, 0 deletionstest/replication-luatest/gh_6033_box_promote_demote_test.lua
Loading
Please register or sign in to comment