From: Sage Weil Date: Tue, 25 Jun 2013 01:51:07 +0000 (-0700) Subject: mon/Elector: cancel election timer if we bootstrap X-Git-Tag: v0.65~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9ae0ec83dabe37ac15e5165559debdfef7a5f91d;p=ceph.git mon/Elector: cancel election timer if we bootstrap If we short-circuit and bootstrap, cancel our timer. Otherwise it will go off some time later when we are in who knows what state. Backport: cuttlefish Signed-off-by: Sage Weil Reviewed-by: Joao Eduardo Luis --- diff --git a/src/mon/Elector.cc b/src/mon/Elector.cc index b3db1afab3c..7172510d807 100644 --- a/src/mon/Elector.cc +++ b/src/mon/Elector.cc @@ -346,6 +346,7 @@ void Elector::dispatch(Message *m) t.put("monmap", "last_committed", mon->monmap->epoch); mon->store->apply_transaction(t); //mon->monmon()->paxos->stash_latest(mon->monmap->epoch, em->monmap_bl); + cancel_timer(); mon->bootstrap(); m->put(); delete peermap;