]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: data sync drains lease stack on lease failure 26639/head
authorCasey Bodley <cbodley@redhat.com>
Mon, 25 Feb 2019 19:10:39 +0000 (14:10 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 25 Feb 2019 20:54:51 +0000 (15:54 -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>
src/rgw/rgw_data_sync.cc

index fc924eeed865cb7206b43bb38edbcbc7de68a28f..6cd55eece17e559cd7e86c876a39510a426b4e2c 100644 (file)
@@ -1216,6 +1216,7 @@ public:
         if (lease_cr->is_done()) {
           tn->log(5, "failed to take lease");
           set_status("lease lock failed, early abort");
+          drain_all();
           return set_cr_error(lease_cr->get_ret_status());
         }
         set_sleeping(true);
@@ -1307,6 +1308,7 @@ public:
           if (lease_cr->is_done()) {
             tn->log(5, "failed to take lease");
             set_status("lease lock failed, early abort");
+            drain_all();
             return set_cr_error(lease_cr->get_ret_status());
           }
           set_sleeping(true);
@@ -3176,6 +3178,7 @@ int RGWRunBucketSyncCoroutine::operate()
       if (lease_cr->is_done()) {
         tn->log(5, "failed to take lease");
         set_status("lease lock failed, early abort");
+        drain_all();
         return set_cr_error(lease_cr->get_ret_status());
       }
       set_sleeping(true);