]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: data sync checks whether the lease failed to renew 23534/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 13 Aug 2018 19:47:29 +0000 (15:47 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 7 Sep 2018 15:18:23 +0000 (11:18 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_data_sync.cc

index 28066ae954f432b6f2b16b697c4a99081ae7de28..8aa594b682aa9154e83c51ef80cf91a3248262ab 100644 (file)
@@ -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<RGWRadosGetOmapKeysCR::Result>();
         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);