]> git.apps.os.sepia.ceph.com Git - ceph.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)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 1 Feb 2022 22:28:27 +0000 (17:28 -0500)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_data_sync.cc

index d40ac4dffcae3e2697d7adf04527eef224492379..a15480ed2f1055c229a1a96f9898685651b4a88d 100644 (file)
@@ -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;
   }