From fb9e72599db4170ee3d5ec25d954c78cbfea1317 Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Fri, 10 Sep 2021 12:28:28 -0400 Subject: [PATCH] rgw: RGWCollectBucketSyncStatusCR doesn't need the shard count Signed-off-by: Adam C. Emerson --- src/rgw/rgw_data_sync.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index d40ac4dffcae3..a15480ed2f105 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -5733,7 +5733,9 @@ class RGWCollectBucketSyncStatusCR : public RGWShardCollectCR { store(store), sc(sc), env(sc->env), gen(gen), i(status->begin()), end(status->end()) { - sync_pair.source_bs = rgw_bucket_shard(source_bucket_info.bucket, source_bucket_info.layout.current_index.layout.normal.num_shards > 0 ? 0 : -1); + // This function doesn't need to know the remote shard count, but + // callers of read_bucket_inc_sync_status do + sync_pair.source_bs = rgw_bucket_shard(source_bucket_info.bucket, 0); sync_pair.dest_bucket = dest_bucket_info.bucket; } -- 2.39.5