]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: allow per-bucket minimum number of shards
authorJ. Eric Ivancich <ivancich@redhat.com>
Wed, 15 Jan 2025 16:26:59 +0000 (11:26 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Fri, 28 Feb 2025 19:31:34 +0000 (14:31 -0500)
commit5ee4a92380ee351dec501b09e251cb9c86d023f8
tree32850102540eef617359fd97a22ac16bab6fdbc9
parentbdd6ce2bafff65a6ddb2db81ada4facb38b11647
rgw: allow per-bucket minimum number of shards

Dynamic resharding can now reduce the number of shards. The code
currently has a hard-coded value of 11 as the minimum number of shards
dynamic resharding can reshard to. There may be cases where the user
wants to set an alternate minimum, such as when they have a sense of
how many objects the bucket will eventually hold.

This PR builds off of https://github.com/ceph/ceph/pull/61269 .

That PR allows the user to specify an initial number of shards during
bucket creation. This PR then takes that number to be the minimum and
saves it in the layout field of the bucket instance object
(RGWBucketInfo).

When dynamic resharding is triggered, it will use that stored value as
a minimum number of shards for resharing.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/rgw/driver/rados/rgw_bucket.cc
src/rgw/driver/rados/rgw_rados.cc
src/rgw/driver/rados/rgw_rados.h
src/rgw/driver/rados/rgw_reshard.cc
src/rgw/driver/rados/rgw_reshard.h
src/rgw/rgw_bucket_layout.cc
src/rgw/rgw_bucket_layout.h
src/rgw/rgw_common.h
src/test/rgw/test_rgw_reshard.cc