From: Greg Farnum Date: Thu, 30 Jan 2020 12:43:13 +0000 (-0800) Subject: mon: elector: return after triggering a new election X-Git-Tag: v15.1.1~596^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32981%2Fhead;p=ceph.git mon: elector: return after triggering a new election When receiving an old propose, we were correctly triggering a new election but not then returning out of receive_propose(), so we processed the "should I defer" logic and perhaps sent out a deferal (in the current epoch!). Fixes: https://tracker.ceph.com/issues/42977 Signed-off-by: Greg Farnum --- diff --git a/src/mon/ElectionLogic.cc b/src/mon/ElectionLogic.cc index 51c81598d4bc..f6e4622bb0ad 100644 --- a/src/mon/ElectionLogic.cc +++ b/src/mon/ElectionLogic.cc @@ -147,8 +147,8 @@ void ElectionLogic::receive_propose(int from, epoch_t mepoch) elector->trigger_new_election(); } else { ldout(cct, 5) << " ignoring old propose" << dendl; - return; } + return; } if (elector->get_my_rank() < from) {