mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
rgw: wait for completion only if not completion available
In a bucket aio operation, wait for completions only if there are no completions available. Otherwise we might wait forever, as everything already complete. Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
This commit is contained in:
parent
a78a93e5a1
commit
f3a57ee6a6
@ -66,8 +66,11 @@ bool BucketIndexAioManager::wait_for_completions(int valid_ret_code,
|
||||
lock.Unlock();
|
||||
return false;
|
||||
}
|
||||
// Wait for AIO completion
|
||||
cond.Wait(lock);
|
||||
|
||||
if (completions.empty()) {
|
||||
// Wait for AIO completion
|
||||
cond.Wait(lock);
|
||||
}
|
||||
|
||||
// Clear the completed AIOs
|
||||
map<int, librados::AioCompletion*>::iterator iter = completions.begin();
|
||||
|
Loading…
Reference in New Issue
Block a user