We need to call reset during every election cycle; luckily we
can call it more than once. bump_epoch is (by definition!) only called
once per cycle, and it's called at the beginning, so we put it there.
Fixes #4858.
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
(cherry picked from commit
6ae9bbb5d03cb5695a4ebb7a3c20f729de1bd67a)
Conflicts:
src/mon/Elector.cc
assert(epoch <= e);
epoch = e;
mon->store->put_int(epoch, "election_epoch");
+ mon->reset();
// clear up some state
electing_me = false;