From: Greg Farnum Date: Mon, 26 Mar 2012 18:03:27 +0000 (-0700) Subject: paxos: share_state sends every unknown value, including the stashed one X-Git-Tag: v0.45~46^2~1^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c3b04644544edb4ca0d19ba1d87b1e190702edb5;p=ceph.git paxos: share_state sends every unknown value, including the stashed one Sage points out that the stashed object might not be the same as the one we actually archive. For instance, OSDMonitor stashes the full OSDMap but the items it stores in the regular machine_name dir are incrementals. Signed-off-by: Greg Farnum --- diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 66c720af533d..a969ccad593c 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -162,7 +162,7 @@ void Paxos::share_state(MMonPaxos *m, version_t peer_first_committed, version_t assert(peer_last_committed < last_committed); dout(10) << "share_state peer has fc " << peer_first_committed << " lc " << peer_last_committed << dendl; - version_t v = peer_last_committed; + version_t v = peer_last_committed + 1; // start with a stashed full copy? if (peer_last_committed + 1 < first_committed) { @@ -175,8 +175,8 @@ void Paxos::share_state(MMonPaxos *m, version_t peer_first_committed, version_t v = l; } - // include (remaining) incrementals - for (v++; + // include incrementals + for ( ; v <= last_committed; v++) { if (mon->store->exists_bl_sn(machine_name, v)) {