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>
MonitorDBStore::Transaction t;
t.put(Monitor::MONITOR_NAME, "election_epoch", epoch);
mon->store->apply_transaction(t);
+ mon->reset();
// clear up some state
electing_me = false;