]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix off-by-one in check for when sync falls behind
authorSage Weil <sage@inktank.com>
Thu, 18 Jul 2013 04:31:46 +0000 (21:31 -0700)
committerSage Weil <sage@inktank.com>
Thu, 18 Jul 2013 15:38:59 +0000 (08:38 -0700)
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>
src/mon/Monitor.cc

index 9c23a825bd9abcbf2863355b479b8d2c033ff509..9ae3e93a111b3075d59c9666c838b4441a78f4a8 100644 (file)
@@ -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);