]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rg/multisite: if the first shard fails to sync, we must drain and return error.
authorShilpa Jagannath <smanjara@redhat.com>
Thu, 29 Aug 2024 20:45:59 +0000 (16:45 -0400)
committerShilpa Jagannath <smanjara@redhat.com>
Tue, 10 Sep 2024 16:56:22 +0000 (12:56 -0400)
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
src/rgw/driver/rados/rgw_data_sync.cc

index 58f5cd0690c46d9bbdb0981d4a3a9f3883941d02..8ec360b64a38b8d6d7f504e07a6a0ebb76dfa226 100644 (file)
@@ -1702,8 +1702,12 @@ public:
                       lease_cr, bucket_shard_cache, nullptr, error_repo, tn, false);
           tn->log(10, SSTR("full sync: syncing shard_id " << sid << " of gen " << each->gen));
           if (first_shard) {
-            yield call(shard_cr);
             first_shard = false;
+            yield call(shard_cr);
+            if (retcode < 0) {
+              drain_all();
+              return set_cr_error(retcode);
+            }
           } else {
             yield_spawn_window(shard_cr, sc->lcc.adj_concurrency(cct->_conf->rgw_data_sync_spawn_window),
                               [&](uint64_t stack_id, int ret) {