]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix metadata sync backoff
authorYehuda Sadeh <yehuda@redhat.com>
Mon, 14 Mar 2016 01:08:52 +0000 (18:08 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 14 Mar 2016 01:08:52 +0000 (18:08 -0700)
Need to reset backoff only when we know system is functional end to end. Earlier
we reset it after locking succeeded, but that could succeed even if we're not
connected to the peer.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_sync.cc

index 7fafad3f41e91d5b0c84c3a144b38e313dac82d0..4d7c4813a2d3e99a66118c131157b7ed04e3cb43 100644 (file)
@@ -1514,7 +1514,6 @@ public:
           set_sleeping(true);
           yield;
         }
-        *reset_backoff = true;
       }
       mdlog_marker = sync_marker.marker;
       set_marker_tracker(new RGWMetaSyncShardMarkerTrack(sync_env,
@@ -1554,6 +1553,7 @@ public:
           drain_all();
           return retcode;
         }
+        *reset_backoff = true; /* if we got to this point, all systems function */
        ldout(sync_env->cct, 20) << __func__ << ":" << __LINE__ << ": shard_id=" << shard_id << " mdlog_marker=" << mdlog_marker << " sync_marker.marker=" << sync_marker.marker << dendl;
        if (mdlog_marker > max_marker) {
           marker = max_marker;