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>
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);
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);
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);