From: Casey Bodley Date: Tue, 7 Jan 2020 18:28:19 +0000 (-0500) Subject: rgw: incremental data sync respects spawn window X-Git-Tag: v14.2.10~226^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=75e7701ac24a9c797ee094c0f7806b32a6887259;p=ceph.git rgw: incremental data sync respects spawn window RGWReadRemoteDataLogShardCR will fetch up to 1000 entries. in order for the spawn window to apply correctly, it has to be enforced inside the loop over those entries Signed-off-by: Casey Bodley (cherry picked from commit 94a3affe7c7fc0a64e5b86f675326d6aee4e9b7e) --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 515bdcb52286..bad204699ece 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1456,17 +1456,17 @@ public: } } } - } - while ((int)num_spawned() > spawn_window) { - set_status() << "num_spawned() > spawn_window"; - yield wait_for_child(); - int ret; - while (collect(&ret, lease_stack.get())) { - if (ret < 0) { - tn->log(10, "a sync operation returned error"); - /* we have reported this error */ + while ((int)num_spawned() > spawn_window) { + set_status() << "num_spawned() > spawn_window"; + yield wait_for_child(); + int ret; + while (collect(&ret, lease_stack.get())) { + if (ret < 0) { + tn->log(10, "a sync operation returned error"); + /* we have reported this error */ + } + /* not waiting for child here */ } - /* not waiting for child here */ } }