Failure to do so will mean that we will always ack the same leader during
an election started by another monitor. This had been working so far
because we were still acking the existing leader if he was supposed to
still be the leader; or we were acking a new potentially leader; or we
would eventually fall behind on an election and start a new election
ourselves, thus resetting the previously acked leader. While this wasn't
something that mattered much until now, the timechecks code stumbled into
this tiny issue and was failing hard at completing a round because there
wouldn't be a reset before the election started -- timechecks are bound
to election epochs.
Fixes: #3854
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit
c54781618569680898e77e151dd7364f22ac4aa1)
assert(from < mon->rank);
assert(m->epoch % 2 == 0);
+ leader_acked = -1;
+
// i should have seen this election if i'm getting the victory.
if (m->epoch != epoch + 1) {
dout(5) << "woah, that's a funny epoch, i must have rebooted. bumping and re-starting!" << dendl;