summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-06-24 18:51:07 -0700
committerSage Weil <sage@inktank.com>2013-06-25 13:40:11 -0700
commit3020c5ea07a91475a7261dc2b810f5b61a1ae1f2 (patch)
treed4310f2010358d032f928854a3c0dee3c7533c59
parent305f0c50a5f0ffabc73e10bdf4590217d5d5d211 (diff)
downloadceph-3020c5ea07a91475a7261dc2b810f5b61a1ae1f2.tar.gz
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 <sage@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com> (cherry picked from commit 9ae0ec83dabe37ac15e5165559debdfef7a5f91d)
-rw-r--r--src/mon/Elector.cc1
1 files changed, 1 insertions, 0 deletions
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;