Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1810779

Summary: rgw: clear result for each iteration of bucket listing when testing if bucket empty
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: J. Eric Ivancich <ivancich>
Component: RGWAssignee: J. Eric Ivancich <ivancich>
Status: CLOSED ERRATA QA Contact: Tejas <tchandra>
Severity: urgent Docs Contact:
Priority: low    
Version: 3.3CC: cbodley, ceph-eng-bugs, kbader, mbenjamin, mmurthy, rmandyam, sweil, tserlin
Target Milestone: z4   
Target Release: 3.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: ceph-12.2.12-101.el7cp Ubuntu: ceph_12.2.12-96redhat1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-06 08:27:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description J. Eric Ivancich 2020-03-05 21:23:33 UTC
Description of problem:

The key question is whether a bug or bad behavior might result from not having https://github.com/ceph/ceph/pull/33693 backported to 3.3z4.

RGWRados::check_bucket_empty looks into a bucket to see if there are any entries that are not in a namespace. Namespaced entries are read but skipped over and not used to determine the result. The first non-namespaced entry encountered allows the function to return a “not empty” result. To return an “empty” result, all non-namespaced entries need to be visited.

In cases where a bucket contains namespaced entries, there is a decent chance that they will precede all of the non-namespaced entries because the underscore (used to indicate a namespace) lexically precedes the lower-case ASCII/UTF-8 letters.

If there happened to be over 1000 such namespaced entries, then the first iteration of the loop would fail to find a non-namespaced entry, and it would have to go through subsequent iterations. Prior to this PR new entries would be appended to the result collection after the entries from the first (earlier) iteration(s).

Both the final marker and is_truncated would always be set correctly, so no behavior would result from that. However subsequent iterations of the loop would re-visit entries from all earlier iterations, which a) reduces performance and b) consumes more memory. I don’t know what the worst case could be numerically, but if a bucket contained billions of namespaced entries I could imagine some systems running out of memory. And for that reason I’d prefer the PR to be incorporated into 3.3z4.

Version-Release number of selected component (if applicable):


How reproducible:

Purely theoretical and this moment and the bug has not been produced.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 RHEL Program Management 2020-03-05 21:23:40 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.

Comment 14 errata-xmlrpc 2020-04-06 08:27:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1320

Comment 15 Red Hat Bugzilla 2023-09-14 05:53:57 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days