From: Casey Bodley Date: Mon, 25 Feb 2019 19:10:39 +0000 (-0500) Subject: rgw: data sync drains lease stack on lease failure X-Git-Tag: v13.2.6~6^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26762%2Fhead;p=ceph.git rgw: data sync drains lease stack on lease failure 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 (cherry picked from commit 11ff8653dcaf7663a0553e3175dec75843b3ccea) --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index a740c4914672..9a382ff59597 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1304,6 +1304,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); @@ -1396,6 +1397,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); @@ -3186,6 +3188,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);