From: Shilpa Jagannath Date: Thu, 29 Aug 2024 20:45:59 +0000 (-0400) Subject: rg/multisite: if the first shard fails to sync, we must drain and return error. X-Git-Tag: testing/wip-khiremat-testing-20250424.121018-squid-debug~28^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=71aa9f65e24ec41c9c2a99dd675fd303fb7cc284;p=ceph-ci.git rg/multisite: if the first shard fails to sync, we must drain and return error. Signed-off-by: Shilpa Jagannath (cherry picked from commit 676479354d95b1b4a95b7336db4282fa3dd78151) Fixes: https://tracker.ceph.com/issues/68298 Signed-off-by: Adam C. Emerson --- diff --git a/src/rgw/driver/rados/rgw_data_sync.cc b/src/rgw/driver/rados/rgw_data_sync.cc index dbea56d4de7..c4a19291f41 100644 --- a/src/rgw/driver/rados/rgw_data_sync.cc +++ b/src/rgw/driver/rados/rgw_data_sync.cc @@ -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) {