From 6c61341697b99db34466c9e7e90aa7867048d651 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 26 Apr 2016 15:59:33 -0700 Subject: [PATCH] rgw: collect children after waiting for them Otherwise we're going to busy loop there. Signed-off-by: Yehuda Sadeh (cherry picked from commit 806fb85d18653910863ba6b8cb56b8db1a0fa3d2) --- src/rgw/rgw_data_sync.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 71db08edeb44d..e65f37663f166 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -2305,7 +2305,12 @@ int RGWBucketShardIncrementalSyncCR::operate() } ldout(sync_env->cct, 5) << *this << ": [inc sync] can't do op on key=" << key << " need to wait for conflicting operation to complete" << dendl; yield wait_for_child(); - + while (collect(&ret)) { + if (ret < 0) { + ldout(sync_env->cct, 0) << "ERROR: a child operation returned error (ret=" << ret << ")" << dendl; + /* we have reported this error */ + } + } } if (!marker_tracker->index_key_to_marker(key, entry->op, cur_id)) { set_status() << "can't do op, sync already in progress for object";