]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: make sure max_objs_per_shard is appropriate in debugging scenarios 64294/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 22 May 2025 20:15:56 +0000 (16:15 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Tue, 1 Jul 2025 19:41:38 +0000 (15:41 -0400)
commit6bb36c88fd5b71cd2a4a4a58905928c0b0c7f060
tree2f1801714aabe8e69be9bba0bd4521b1470c7f5c
parentf9e40019574618a73e9eec0b429c96efad477375
rgw: make sure max_objs_per_shard is appropriate in debugging scenarios

When we have a versioned bucket, we reduce max_objs_per_shard by a
factor of 3 to account for the extra bucket index entries required in
such buckets. And during debugging, we may want to induce early
resharding by setting max_objs_per_shard to an artificially low
value. Combined, that math could result in max_objs_per_shard with a
value of 0 that would cause a division by zero crash. This fixes that.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 27f9c103f1a98b78b9bd58d0e669d557c3851702)
src/rgw/driver/rados/rgw_rados.cc