summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-07-17 21:31:46 -0700
committerSage Weil <sage@inktank.com>2013-07-18 08:38:59 -0700
commit29c0252dc434884c1bc7b6eade306059e2c09ef1 (patch)
treeccd5d94bdb1e4564cf43f5dbc74ada19b2f2f82e
parent59f3455e4874e5d705e53ab8f749e8080eb6c42f (diff)
downloadceph-29c0252dc434884c1bc7b6eade306059e2c09ef1.tar.gz
mon: fix off-by-one in check for when sync falls behind
This is what e213b1bc25a212ffe42623c1d4b4eadf9f69319e intended to do but managed to bungle by using >= instead of >. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
-rw-r--r--src/mon/Monitor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc
index 9c23a825bd9..9ae3e93a111 100644
--- a/src/mon/Monitor.cc
+++ b/src/mon/Monitor.cc
@@ -1036,7 +1036,7 @@ void Monitor::handle_sync_get_chunk(MMonSync *m)
sp.reset_timeout(g_ceph_context, g_conf->mon_sync_timeout * 2);
if (sp.last_committed < paxos->get_first_committed() &&
- paxos->get_first_committed() >= 1) {
+ paxos->get_first_committed() > 1) {
dout(10) << __func__ << " sync requester fell behind paxos, their lc " << sp.last_committed
<< " < our fc " << paxos->get_first_committed() << dendl;
sync_providers.erase(m->cookie);