]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerAdam C. Emerson <aemerson@redhat.com>
Fri, 14 Mar 2025 18:02:57 +0000 (14:02 -0400)
Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
(cherry picked from commit 676479354d95b1b4a95b7336db4282fa3dd78151)

Fixes: https://tracker.ceph.com/issues/68298
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/driver/rados/rgw_data_sync.cc

index dbea56d4de78e8fa0d65edbbb125719db217ca24..c4a19291f4158d7bc14bad73f52a601d39370b33 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) {