From 622fbadd662751ba86d693696a24b1ac29bc2051 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 11 Nov 2011 12:15:16 -0800 Subject: [PATCH] paxos: fix off-by-one in share_state We hit this on adding a new monitor to an existing cluster. Signed-off-by: Sage Weil --- src/mon/Paxos.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 800b30b52c588..bf1fd3bd68ff8 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -159,7 +159,7 @@ void Paxos::share_state(MMonPaxos *m, version_t peer_first_committed, version_t version_t v = peer_last_committed; // start with a stashed full copy? - if (peer_last_committed < first_committed) { + if (peer_last_committed + 1 < first_committed) { bufferlist bl; version_t l = get_latest(bl); assert(l <= last_committed); -- 2.39.5