Skip to content

Commit

Permalink
rgw: collect children after waiting for them
Browse files Browse the repository at this point in the history
Otherwise we're going to busy loop there.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 806fb85)
  • Loading branch information
yehudasa committed May 9, 2016
1 parent 4a5f33d commit 6c61341
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rgw/rgw_data_sync.cc
Expand Up @@ -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";
Expand Down

0 comments on commit 6c61341

Please sign in to comment.