From 9ae0ec83dabe37ac15e5165559debdfef7a5f91d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 24 Jun 2013 18:51:07 -0700 Subject: [PATCH] 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 --- src/mon/Elector.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mon/Elector.cc b/src/mon/Elector.cc index b3db1afab3cea..7172510d807c0 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; -- 2.39.5