fix: use MsgHup instead of MsgTimeoutNow for timeout_now
Summary
- fix: use MsgHup instead of MsgTimeoutNow for timeout_now
The problem is MsgTimeoutNow always results in a new election, because it explicitly ignores the pre_vote step. This results in integration test flakiness whenever a follower calls promote_or_fail while the leader's raft log is longer.
Контекст:
MessageType::MsgTimeoutNow => {
if self.promotable {
info!(...);
// Leadership transfers never use pre-vote even if self.pre_vote is true; we
// know we are not recovering from a partition so there is no need for the
// extra round trip.
self.hup(true);
- Cherry-pick to: none
- Docs follow-up: not necessary