From: Joao Eduardo Luis Date: Tue, 26 Feb 2013 01:54:10 +0000 (+0000) Subject: mon: Paxos: bootstrap if we have fallen behind when we start collecting X-Git-Tag: v0.59~96^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d9962cc3ddded89ae15242fcbe4e9ef7fb3c650e;p=ceph.git mon: Paxos: bootstrap if we have fallen behind when we start collecting Fixes: #4256 Signed-off-by: Joao Eduardo Luis Reviewed-by: Sage Weil --- diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index d0a716a6e46d..9a47ec946d6c 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -161,6 +161,16 @@ void Paxos::handle_collect(MMonPaxos *collect) // we're recoverying, it seems! state = STATE_RECOVERING; + if (collect->first_committed > last_committed+1) { + dout(5) << __func__ + << " leader's lowest version is too high for our last committed" + << "(theirs: " << collect->first_committed + << "; ours: " << last_committed << ") -- bootstrap!" << dendl; + collect->put(); + mon->bootstrap(); + return; + } + // reply MMonPaxos *last = new MMonPaxos(mon->get_epoch(), MMonPaxos::OP_LAST, ceph_clock_now(g_ceph_context));