]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: collect children after waiting for them
authorYehuda Sadeh <yehuda@redhat.com>
Tue, 26 Apr 2016 22:59:33 +0000 (15:59 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 9 May 2016 23:00:14 +0000 (16:00 -0700)
Otherwise we're going to busy loop there.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 806fb85d18653910863ba6b8cb56b8db1a0fa3d2)

src/rgw/rgw_data_sync.cc

index 71db08edeb44d044de0e9321aa024a91d6e81048..e65f37663f166a493769dbb28f50cbdea193fbc7 100644 (file)
@@ -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";