Skip to content

rgw: Optional Yield Completion - #71367

Merged
adamemerson merged 4 commits into
ceph:mainfrom
adamemerson:wip-rgw-no-use-blocked
Sep 23, 2026
Merged

adamemerson merged 4 commits into
ceph:mainfrom
adamemerson:wip-rgw-no-use-blocked

Conversation

@adamemerson

@adamemerson adamemerson commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Introduce rgw::maybe_yield, a completion adapter that takes a DoutPrefixProvider and a yield_context, yields if non-null and blocks otherwise.

This is intended to replace use of use_blocked for calls that require a CompletionToken when we have a yield_context while not requiring a conditional at every call.

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.

Comment thread src/rgw/driver/d4n/d4n_policy.cc Resolved
@adamemerson
adamemerson force-pushed the wip-rgw-no-use-blocked branch from 73e6a2d to e98fcea Compare August 28, 2026 00:46
@github-actions

Copy link
Copy Markdown

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

@smanjara smanjara left a comment

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.

looks good overall. some minor comments.

Comment thread src/rgw/yield_completion.h Resolved
Comment thread src/rgw/yield_completion.h Resolved
Comment thread src/rgw/yield_completion.h Resolved
Logging functions accept null `DoutPrefixProvider*`s as no-ops. I had
considered logging to `std::cerr` `dout_emergency` style, but that
didn't seem consistent with the log priority for this message being
20.

Signed-off-by: Adam C. Emerson <[email protected]>
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

Right now when calling an asio operation your choices are to use
`use_blocked` or to do a two-step where you deconstruct the
`optional_yield` and have two calls.

This is sub-optimal, and people are using `use_blocked`, so this is an
alternative.

Signed-off-by: Adam C. Emerson <[email protected]>
Replace with `rgw::oyc`.

Signed-off-by: Adam C. Emerson <[email protected]>
Remove uses of `use_blocked` where we have a yield context, and where
we aren't building an object containing an executor.

Signed-off-by: Adam C. Emerson <[email protected]>
@adamemerson
adamemerson force-pushed the wip-rgw-no-use-blocked branch from e98fcea to 8a80646 Compare September 3, 2026 22:43
@smanjara
smanjara self-requested a review September 3, 2026 22:50
@anrao19

anrao19 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-17-04:59.

@anrao19

anrao19 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to main integration testing by anuchaithra started 2026-09-17-04:59.

Testing completed and got approval from @ivancich, morr details in https://tracker.ceph.com/issues/80592).
@adamemerson , if no further testing is needed then this pr can be merged

@adamemerson
adamemerson merged commit 52e4ba9 into ceph:main Sep 23, 2026
18 checks passed
@cbodley

cbodley commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

yay, very nice 👍

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