]> git-server-git.apps.pok.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)
committerCasey Bodley <cbodley@redhat.com>
Tue, 7 Jan 2020 21:12:22 +0000 (16:12 -0500)
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>
src/rgw/rgw_data_sync.cc

index 0812fb27b03bae24b237967c576de01ae20cdcc1..5973188beba1b8daf285c30936e317536087dcda 100644 (file)
@@ -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 */
           }
         }