]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: data sync drains lease stack on lease failure 26761/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 25 Feb 2019 19:10:39 +0000 (14:10 -0500)
committerPrashant D <pdhange@redhat.com>
Tue, 5 Mar 2019 02:02:11 +0000 (21:02 -0500)
on lease failure, call drain_all() to collect the spawned lease stack.
otherwise, the parent coroutine will inherit this spawned stack and may
not drain or collect it manually. RGWDataSyncShardControlCR, for
example, does not drain/collect because it only uses call() to run a
single RGWDataSyncShardCR, so all lease stacks from RGWDataSyncShardCR
just pile up in the RGWDataSyncShardControlCR

Fixes: http://tracker.ceph.com/issues/38479
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 11ff8653dcaf7663a0553e3175dec75843b3ccea)

src/rgw/rgw_data_sync.cc

index 088f3aa8dcc4363f0149daf97f11f7826ea5133b..1efb1876d3e60b0fbcf367357bfc78c8bed7c526 100644 (file)
@@ -1242,6 +1242,7 @@ public:
         if (lease_cr->is_done()) {
           ldout(cct, 5) << "lease cr failed, done early " << dendl;
           set_status("lease lock failed, early abort");
+          drain_all();
           return set_cr_error(lease_cr->get_ret_status());
         }
         set_sleeping(true);
@@ -1323,6 +1324,7 @@ public:
           if (lease_cr->is_done()) {
             ldout(cct, 5) << "lease cr failed, done early " << dendl;
             set_status("lease lock failed, early abort");
+            drain_all();
             return set_cr_error(lease_cr->get_ret_status());
           }
           set_sleeping(true);
@@ -3033,6 +3035,7 @@ int RGWRunBucketSyncCoroutine::operate()
       if (lease_cr->is_done()) {
         ldout(cct, 5) << "lease cr failed, done early" << dendl;
         set_status("lease lock failed, early abort");
+        drain_all();
         return set_cr_error(lease_cr->get_ret_status());
       }
       set_sleeping(true);