Skip to content

Commit 6764793

Browse files
author
Shilpa Jagannath
committed
rg/multisite: if the first shard fails to sync, we must drain and return error.
Signed-off-by: Shilpa Jagannath <[email protected]>
1 parent 4640698 commit 6764793

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rgw/driver/rados/rgw_data_sync.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,8 +1702,12 @@ class RGWDataFullSyncSingleEntryCR : public RGWCoroutine {
17021702
lease_cr, bucket_shard_cache, nullptr, error_repo, tn, false);
17031703
tn->log(10, SSTR("full sync: syncing shard_id " << sid << " of gen " << each->gen));
17041704
if (first_shard) {
1705-
yield call(shard_cr);
17061705
first_shard = false;
1706+
yield call(shard_cr);
1707+
if (retcode < 0) {
1708+
drain_all();
1709+
return set_cr_error(retcode);
1710+
}
17071711
} else {
17081712
yield_spawn_window(shard_cr, sc->lcc.adj_concurrency(cct->_conf->rgw_data_sync_spawn_window),
17091713
[&](uint64_t stack_id, int ret) {

0 commit comments

Comments
 (0)