]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: incremental data sync respects spawn window
authorCasey Bodley <cbodley@redhat.com>
Tue, 7 Jan 2020 18:28:19 +0000 (13:28 -0500)
committerNathan Cutler <ncutler@suse.com>
Thu, 13 Feb 2020 13:53:48 +0000 (14:53 +0100)
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 <cbodley@redhat.com>
(cherry picked from commit 94a3affe7c7fc0a64e5b86f675326d6aee4e9b7e)

src/rgw/rgw_data_sync.cc

index 515bdcb52286a35071f571ecb441c95c0abd05a6..bad204699ece1382618079d1ad0452cb04a7ca21 100644 (file)
@@ -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 */
           }
         }