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-rishabh-testing-20240930.143059~21^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=676479354d95b1b4a95b7336db4282fa3dd78151;p=ceph-ci.git rg/multisite: if the first shard fails to sync, we must drain and return error. Signed-off-by: Shilpa Jagannath --- diff --git a/src/rgw/driver/rados/rgw_data_sync.cc b/src/rgw/driver/rados/rgw_data_sync.cc index 58f5cd0690c..8ec360b64a3 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) {