]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: address 0-length listing results when non-vis entries dominate
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 13 Feb 2020 01:38:44 +0000 (20:38 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Thu, 13 Feb 2020 01:38:44 +0000 (20:38 -0500)
commit28bd8bada4236060db6d5aed6b1eb345ab507890
tree7369aaa2d5dd5fbd951af766beb3f1ac85dd9e25
parent210fb418063654054f3680da9bca3e8af102ae3e
rgw: address 0-length listing results when non-vis entries dominate

A change to advance the marker in RGWRados::cls_bucket_list_ordered to
the last entry visited rather than the final entry in list to push
progress as far as possible.

Since non-vis entries tend to cluster on the same shard, such as
during incomplete multipart uploads, this can severely limit the
number of entries returned by a call to
RGWRados::cls_bucket_list_ordered since once that shard has provided
all its members, we must stop. This interacts with a recent
optimization to reduce the number of entries requested from each
shard. To address this the number of attempts is sent as a parameter,
so the number of entries requested from each shard can grow with each
attempt. Currently the growth is linear but perhaps exponential growth
(capped at number of entries requested) should be considered.

Previously RGWRados::Bucket::List::list_objects_ordered was capped at
2 attempts, but now we keep attempting to insure we make forward
progress and return entries when some exist. If we fail to make
forward progress, we log the error condition and stop looping.

Additional logging, mostly at level 20, is added to the two key
functions involved in ordered bucket listing to make it easier to
follow the logic and address potential future issues that might arise.

Additionally modify attempt number based on how many results were
received.

Change the per-shard request number, so it grows exponentially rather
than linearly as the attempts go up.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/rgw/rgw_admin.cc
src/rgw/rgw_bucket.cc
src/rgw/rgw_rados.cc
src/rgw/rgw_rados.h