]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw/multisite: parse shard_id value correctly to handle num_shards 0 case
authorShilpa Jagannath <smanjara@redhat.com>
Tue, 18 Apr 2023 20:40:09 +0000 (16:40 -0400)
committerShilpa Jagannath <smanjara@redhat.com>
Wed, 24 May 2023 19:33:08 +0000 (15:33 -0400)
commitb4bc964eacc871495e67ccddb2a1841da8a08c7f
treeb75ad7b7776c0c4c0f129078eb7f974da94c4639
parent1c116f8d5d19f8ed27a2031ebd5c2fc920b62abc
rgw/multisite: parse shard_id value correctly to handle num_shards 0 case

For buckets that have num_shards set to 0, bucket instance
will not have a shard_id delimiter. When this bucket instance is parsed,
we end up assigning a value of -1 to shard_id, which is invalid
in data sync. This change ensures that we represent the shard_id correctly
by giving it a valid number

Signed-off-by: Shilpa Jagannath <smanjara@redhat.com>
(cherry picked from commit f11b3dce832221a344440787333c41f61a9f9c67)
src/rgw/driver/rados/rgw_data_sync.cc