diff options
author | Sage Weil <sage@inktank.com> | 2013-06-24 18:51:07 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-06-24 18:51:07 -0700 |
commit | 9ae0ec83dabe37ac15e5165559debdfef7a5f91d (patch) | |
tree | e306bcc97bf9ee6ded6d2ab120464f0fc825a294 | |
parent | 03d3be3eaa96a8e72754c36abd6f355c68d52d59 (diff) | |
download | ceph-9ae0ec83dabe37ac15e5165559debdfef7a5f91d.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>
-rw-r--r-- | src/mon/Elector.cc | 1 |
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; |