]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: RGWCollectBucketSyncStatusCR doesn't need the shard count
authorAdam C. Emerson <aemerson@redhat.com>
Fri, 10 Sep 2021 16:28:28 +0000 (12:28 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 27 May 2022 19:47:33 +0000 (15:47 -0400)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_data_sync.cc

index fc2b8ba1d42b3688c785868810263fb9592f93f1..b225d2e7b0a06c86af6ecba67bec29994403a63c 100644 (file)
@@ -5718,7 +5718,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;
   }