From 94a3affe7c7fc0a64e5b86f675326d6aee4e9b7e Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 7 Jan 2020 13:28:19 -0500 Subject: [PATCH] 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 --- src/rgw/rgw_data_sync.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 0812fb27b03b..5973188beba1 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -1465,17 +1465,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 */ } } -- 2.47.3