From: zhipeng li Date: Wed, 26 Oct 2022 02:40:44 +0000 (-0400) Subject: rgw: modify multisite coroutine stack block X-Git-Tag: v18.1.0~693^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8669e4de2a65dd0651e86421665143eaec061f5c;p=ceph.git rgw: modify multisite coroutine stack block Fixes: https://tracker.ceph.com/issues/57853 Signed-off-by: zhipeng li --- diff --git a/src/rgw/rgw_coroutine.cc b/src/rgw/rgw_coroutine.cc index 0be0daac20a..a9c9c38e3bc 100644 --- a/src/rgw/rgw_coroutine.cc +++ b/src/rgw/rgw_coroutine.cc @@ -557,7 +557,7 @@ bool RGWCoroutinesStack::consume_io_finish(const rgw_io_id& io_id) void RGWCoroutinesManager::handle_unblocked_stack(set& context_stacks, list& scheduled_stacks, - RGWCompletionManager::io_completion& io, int *blocked_count) + RGWCompletionManager::io_completion& io, int *blocked_count, int *interval_wait_count) { ceph_assert(ceph_mutex_is_wlocked(lock)); RGWCoroutinesStack *stack = static_cast(io.user_info); @@ -570,6 +570,9 @@ void RGWCoroutinesManager::handle_unblocked_stack(set& con if (stack->is_io_blocked()) { --(*blocked_count); stack->set_io_blocked(false); + if (stack->is_interval_waiting()) { + --(*interval_wait_count); + } } stack->set_interval_wait(false); if (!stack->is_done()) { @@ -707,7 +710,7 @@ int RGWCoroutinesManager::run(const DoutPrefixProvider *dpp, listtry_get_next(&io)) { - handle_unblocked_stack(context_stacks, scheduled_stacks, io, &blocked_count); + handle_unblocked_stack(context_stacks, scheduled_stacks, io, &blocked_count, &interval_wait_count); } /* @@ -722,7 +725,7 @@ int RGWCoroutinesManager::run(const DoutPrefixProvider *dpp, list