Skip to content

rgw/rgw_quota: avoids duplicated stats fetching/refreshing for the same bucket - #71564

Open
xxhdx1985126 wants to merge 3 commits into
ceph:mainfrom
xxhdx1985126:wip-rgw-quota-fetch-dedup
Open

xxhdx1985126 wants to merge 3 commits into
ceph:mainfrom
xxhdx1985126:wip-rgw-quota-fetch-dedup

Conversation

@xxhdx1985126

@xxhdx1985126 xxhdx1985126 commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

Before this PR, RGWQuotaCache::get_stats only avoids duplicated stats refreshing, but there can still be concurrent stats fetching, or concurrent stats fetching and refreshing, for the same bucket.

This commit refactors RGWQuotaCache related code and makes sure that there can be at most one ongoing stats fetching or refreshing at any time.

Fixes: https://tracker.ceph.com/issues/80598
Signed-off-by: Xuehan Xu [email protected]

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@github-actions github-actions Bot added the rgw label Sep 6, 2026
@xxhdx1985126
xxhdx1985126 force-pushed the wip-rgw-quota-fetch-dedup branch from ff72979 to 044ef31 Compare September 6, 2026 12:09
@xxhdx1985126
xxhdx1985126 marked this pull request as ready for review September 6, 2026 12:10
@xxhdx1985126
xxhdx1985126 requested a review from a team as a code owner September 6, 2026 12:10
@xxhdx1985126 xxhdx1985126 changed the title rgw/rgw_quota: avoids concurrent stats fetching/refreshing for the same bucket rgw/rgw_quota: avoids duplicated stats fetching/refreshing for the same bucket Sep 6, 2026
@xxhdx1985126
xxhdx1985126 force-pushed the wip-rgw-quota-fetch-dedup branch from 044ef31 to df88219 Compare September 17, 2026 07:06
@adamemerson

Copy link
Copy Markdown
Contributor

jenkins test make check

@xxhdx1985126
xxhdx1985126 force-pushed the wip-rgw-quota-fetch-dedup branch from df88219 to e1a92d4 Compare September 30, 2026 06:28
@xxhdx1985126

Copy link
Copy Markdown
Member Author

@adamemerson @cbodley @ivancich Hi, everyone, could you please take a look at this PR? Thanks:-) Our tests proved that this PR resolved the issue.

Comment thread src/rgw/rgw_quota.cc Outdated
auto yield = y.get_yield_context();
rqcs_ref->wait(yield[ec]);
} else {
rqcs_ref->wait(ceph::async::use_blocked[ec]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, will do:-)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adamemerson Hi, I've just addressed the comment, please take a look again, thanks:-)

Drop unnecessary parameters

Signed-off-by: Xuehan Xu <[email protected]>
intrusive_lru can ensure its elements not get evicted as long as there's
still references to them

Signed-off-by: Xuehan Xu <[email protected]>
@xxhdx1985126
xxhdx1985126 force-pushed the wip-rgw-quota-fetch-dedup branch from e1a92d4 to 7e02cb9 Compare November 9, 2026 07:29
Before this commit, RGWQuotaCache::get_stats only avoids duplicated
stats refreshing, but there can still be concurrent stats fetching, or
concurrent stats fetching and refreshing.

This commit makes sure that there can be at most one ongoing stats
fetching or refreshing at any time.

Fixes: https://tracker.ceph.com/issues/80598
Signed-off-by: Xuehan Xu <[email protected]>
@xxhdx1985126
xxhdx1985126 force-pushed the wip-rgw-quota-fetch-dedup branch from 7e02cb9 to c9aa5f1 Compare November 9, 2026 08:12
@anrao19

anrao19 commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-anrao8-testing-2026-11-13-0837-main.

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.

4 participants