]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: add shard reduction ability to dynamic resharding
authorJ. Eric Ivancich <ivancich@redhat.com>
Tue, 14 May 2024 19:09:03 +0000 (15:09 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Fri, 31 May 2024 21:18:04 +0000 (17:18 -0400)
commit0f1726d765b1268229b205f7067a5e0547bc41cb
tree1fd592575ee7415b26993cafe5465b26455a8193
parent9884e6488f6e6ddb178b882c4f3ab2f6a08f402f
rgw: add shard reduction ability to dynamic resharding

Previously, dynamic resharding could only *increase* the number of
bucket index shards for a given bucket. This adds the ability to also
*reduce* the number of shards.

So in addition the existing 100,000 entries (current default value)
per shard trigger for an increase, there's a new trigger of 10,000
entries per shard for a decrease.

However, for buckets with object-counts that go up and down regularly,
we don't want to keep resharding up and down to chase the number of
objects. So for shard reduction to take place there's also a time
delay (default 5 days). Once the entry on the reshard queue (log) is
added for reduction, processing will not result in a reshard reduction
within this delay period as the queue is processed. Only when the
reshard entry is processed after this delay can it perform the shard
reduction.

However, if at any point between the time the shard reduction entry is
added to the queue and after the delay, if the entry is processed and
there are *not* few enough entries to trigger a shard reduction, the
entry on the reshard queue entry will be discarded.

So using the defaults, this effectively means the bucket must have few
enough objects for a shard reduction for 5 consecutive days before the
reshard will take place.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/common/options/rgw.yaml.in
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_quota.cc
src/rgw/rgw_quota.h
src/test/rgw/test_rgw_reshard.cc