From: Yehuda Sadeh Date: Wed, 2 Sep 2015 23:21:47 +0000 (-0700) Subject: rgw: don't force wait on blocked coroutines X-Git-Tag: v10.1.0~354^2~579 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=311c105c8b6f87f330601fa707751394a903acb2;p=ceph.git rgw: don't force wait on blocked coroutines Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_coroutine.cc b/src/rgw/rgw_coroutine.cc index a92a51ccbe517..7678ff78e12e7 100644 --- a/src/rgw/rgw_coroutine.cc +++ b/src/rgw/rgw_coroutine.cc @@ -265,17 +265,10 @@ int RGWCoroutinesManager::run(list& stacks) handle_unblocked_stack(stacks, blocked_stack, &blocked_count); } - if (blocked_count >= ops_window) { - int ret = completion_mgr.get_next((void **)&blocked_stack); - if (ret < 0) { - ldout(cct, 0) << "ERROR: failed to clone shard, completion_mgr.get_next() returned ret=" << ret << dendl; - } - handle_unblocked_stack(stacks, blocked_stack, &blocked_count); - } - ++iter; stacks.pop_front(); - while (iter == stacks.end() && blocked_count > 0) { + + while (stacks.empty() && blocked_count > 0) { int ret = completion_mgr.get_next((void **)&blocked_stack); if (ret < 0) { ldout(cct, 0) << "ERROR: failed to clone shard, completion_mgr.get_next() returned ret=" << ret << dendl; @@ -283,6 +276,10 @@ int RGWCoroutinesManager::run(list& stacks) handle_unblocked_stack(stacks, blocked_stack, &blocked_count); iter = stacks.begin(); } + + if (iter == stacks.end()) { + iter = stacks.begin(); + } } return 0;