Skip to content

rgw: resolve empty ordered bucket listing results w/ CLS filtering#42125

Merged
cbodley merged 3 commits intoceph:masterfrom
ivancich:wip-cls-empty-listing
Aug 5, 2021
Merged

rgw: resolve empty ordered bucket listing results w/ CLS filtering#42125
cbodley merged 3 commits intoceph:masterfrom
ivancich:wip-cls-empty-listing

Conversation

@ivancich
Copy link
Member

@ivancich ivancich commented Jul 1, 2021

rgw: resolve empty ordered bucket listing results w/ CLS filtering

Bucket listing filtering was moved from the RGW lyer to the CLS layer to improve efficiency. However currently if there are enough entries that are filtered out, the CLS call may return zero entries back to RGW. Since we did not mark how far we got, calling it again will yield the same result, causing the process to be stuck and fail.

This solution adds a marker to the CLS call's return object to RGW. That will allow the next call to pick up where it left off.

Because the bucket index is spread across many shards, the CLSRGWConcurrentIO class is used to coordinate these asynchronous calls. Functionality is added to this class to handle re-issuing the call with the new marker to make sure at least one entry is returned.

Fixes: https://tracker.ceph.com/issues/51462
Signed-off-by: J. Eric Ivancich ivancich@redhat.com

@ivancich ivancich requested review from cbodley and mattbenjamin July 1, 2021 03:21
@ivancich ivancich force-pushed the wip-cls-empty-listing branch from f1c0ee7 to 0e4456d Compare July 1, 2021 03:27
@ivancich ivancich force-pushed the wip-cls-empty-listing branch 8 times, most recently from aeb961a to 098819d Compare July 20, 2021 01:02
@ivancich ivancich force-pushed the wip-cls-empty-listing branch 2 times, most recently from 9ed02db to a12389e Compare July 21, 2021 19:49
@ivancich ivancich added needs-review and removed DNM labels Jul 27, 2021
@github-actions
Copy link

github-actions bot commented Aug 2, 2021

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@ivancich ivancich force-pushed the wip-cls-empty-listing branch from a12389e to 3314a15 Compare August 3, 2021 19:00
@ivancich ivancich force-pushed the wip-cls-empty-listing branch from 3314a15 to 56d40db Compare August 3, 2021 20:29
When using asynchronous (concurrent) IO for bucket index requests,
there are two int ids that are used that need to be kept separate --
shard id and request id. In many cases they're the same -- shard 0
gets request 0, and so forth.

But in preparation for re-requests, those ids can diverge, where
request 13 maps to shard 2. The existing code maintained the OIDs that
went with each request. This PR also maintains the shard id as
well. Documentation has been beefed up to help future developers
navigate this.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
When doing an asynchronous/concurrent bucket index operation against
multiple bucket index shards, a special error code is set aside to
indicate that an "advancing" retry of a/some shard(s) is necessary. In
that case another asynchronous call is made on the indicated shard(s)
from the client (i.e., CLSRGWConcurrentIO).  It is up to the subclass
of CLSRGWConcurrentIO to handle the retry such that it "advances" and
simply doesn't get stuck, looping forever.

The retry functionality only works when the "need_multiple_rounds"
functionality is not in use.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
A previous PR moved the much of the filtering that's part of bucket
listing to the CLS layer. One unanticipated result was that it is now
possible for a call to return 0 entries. In such a case we want to
retry the call with the marker moved forward (i.e., advanced),
repeatedly if necessary, in order to either retrieve some entries or
to hit the end of the entries. This PR adds that functionality.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
@ivancich ivancich force-pushed the wip-cls-empty-listing branch from 56d40db to 423c183 Compare August 4, 2021 04:50
@ivancich ivancich requested a review from cbodley August 4, 2021 04:51
@cbodley
Copy link
Contributor

cbodley commented Aug 5, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants