From: Casey Bodley Date: Mon, 13 Aug 2018 19:47:29 +0000 (-0400) Subject: rgw: data sync checks whether the lease failed to renew X-Git-Tag: v14.0.1~176^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=3754871e65830e772f9b902fa162853716eeb78d;p=ceph.git rgw: data sync checks whether the lease failed to renew Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 28066ae954f43..8aa594b682aa9 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1314,6 +1314,11 @@ public: set_marker_tracker(new RGWDataSyncShardMarkerTrack(sync_env, status_oid, sync_marker, tn)); total_entries = sync_marker.pos; do { + if (!lease_cr->is_locked()) { + stop_spawned_services(); + drain_all(); + return set_cr_error(-ECANCELED); + } omapkeys = std::make_shared(); yield call(new RGWRadosGetOmapKeysCR(sync_env->store, rgw_raw_obj(pool, oid), sync_marker.marker, max_entries, omapkeys)); @@ -1406,6 +1411,11 @@ public: logger.log("inc sync"); set_marker_tracker(new RGWDataSyncShardMarkerTrack(sync_env, status_oid, sync_marker, tn)); do { + if (!lease_cr->is_locked()) { + stop_spawned_services(); + drain_all(); + return set_cr_error(-ECANCELED); + } current_modified.clear(); inc_lock.Lock(); current_modified.swap(modified_shards);