]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: elector: return after triggering a new election 32981/head
authorGreg Farnum <gfarnum@redhat.com>
Thu, 30 Jan 2020 12:43:13 +0000 (04:43 -0800)
committerGreg Farnum <gfarnum@redhat.com>
Thu, 30 Jan 2020 12:43:13 +0000 (04:43 -0800)
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 <gfarnum@redhat.com>
src/mon/ElectionLogic.cc

index 51c81598d4bc8f18921f304841d1243b097f1caa..f6e4622bb0ad83832532b5047fa493bd780ccd47 100644 (file)
@@ -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) {