raft: fix crash when leader resigned from its role
Nodes with disabled Raft keep listening for Raft events and persist them. To be able to quickly enroll into the process if they are configured to be candidates. The same for the voter nodes - they can't be a leader, but watch and persist all what is happening. However when a leader resigned from its role, the voter and disabled nodes tried to start a new election round, even though they were not supposed to. That led to a crash, and is fixed in this patch. Closes #5426
Showing
- src/box/raft.c 8 additions, 1 deletionsrc/box/raft.c
- test/replication/gh-5426-election-on-off.result 134 additions, 0 deletionstest/replication/gh-5426-election-on-off.result
- test/replication/gh-5426-election-on-off.test.lua 57 additions, 0 deletionstest/replication/gh-5426-election-on-off.test.lua
- test/replication/suite.cfg 1 addition, 0 deletionstest/replication/suite.cfg
Please register or sign in to comment