Skip to content

squid: osdc: deliver neorados completions to associated executor - #69744

Merged
batrick merged 3 commits into
ceph:squidfrom
cbodley:wip-77273-squid
Aug 5, 2026
Merged

batrick merged 3 commits into
ceph:squidfrom
cbodley:wip-77273-squid

Conversation

@cbodley

@cbodley cbodley commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@cbodley
cbodley requested a review from a team as a code owner June 25, 2026 15:20
@cbodley cbodley added this to the squid milestone Jun 25, 2026
@cbodley cbodley added the core label Jun 25, 2026
@cbodley

cbodley commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

backport should also include #69314

this backport wasn't necessary here because squid doesn't have src/common/async/async_cond.h

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jun 25, 2026
@SrinivasaBharath

Copy link
Copy Markdown
Contributor

@yuriw

yuriw commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri2-testing-20260713.172617-squid.

@yuriw

yuriw commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This PR has been removed from wip-yuri2-testing-20260713.172617-squid.

@yuriw

yuriw commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri9-testing-20260720.140823-squid.

@yuriw

yuriw commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This PR has been removed from wip-yuri9-testing-20260720.140823-squid.

@cbodley
cbodley requested a review from a team July 20, 2026 17:59
@batrick batrick modified the milestones: squid, v19.2.6 Jul 29, 2026
@anrao19

anrao19 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

@anrao19

anrao19 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

cbodley and others added 3 commits July 29, 2026 09:16
while Objecter delivers librados completions directly by calling
Context::complete(), neorados completions are passed in as
boost::asio::any_completion_handler and delivered to an asio executor
via boost::asio::defer() on completion

asio handlers may have an "associated executor" so callers can customize
where these completions are delivered. for example, multithreaded
applications often use strand executors to synchronize completion
handlers and prevent data races between concurrent operations

however, applications like radosgw that depend on strands for
thread-safety did not get it due to the fact that Objecter's
Op::complete() delivered all neorados completions to the default
io_context executor

use boost::asio::get_associated_executor() to respect the handler's
executor affinity, if any. but because the Op's handler is the
type-erased any_completion_handler, its associated executor is also
type-erased as any_completion_executor. that any_completion_executor
doesn't support the blocking::never_t property required by defer/post,
so defer() was changed to dispatch() which may call the handler directly
if Objecter is already running on the requested executor. i assume this
is safe, given that librados' Context-based completions already do this

Fixes: https://tracker.ceph.com/issues/76725

Co-Authored-by: Oguzhan Ozmen <[email protected]>
Signed-off-by: Casey Bodley <[email protected]>
(cherry picked from commit aabb5c7)
repurpose ceph_test_neorados_completions to verify that completions are
delivered to the handler's associated executor

Signed-off-by: Casey Bodley <[email protected]>
(cherry picked from commit c4d9a40)

Conflicts: missing earlier watch-notify changes
	qa/workunits/rados/test.sh
	src/test/neorados/CMakeLists.txt
	src/test/neorados/completions.cc
@github-actions

Copy link
Copy Markdown

⚠️ Audit Override Removed

New commits were pushed to this PR, so the previous override has been removed.

View workflow run

@cbodley

cbodley commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

sorry. rebased and added a fix for this:

or at src/test/neorados/CMakeLists.txt:25 (add_executable):
add_executable cannot create target "ceph_test_neorados_completions"
because another target with the same name already exists.

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Jul 29, 2026
@BBoozmen

BBoozmen commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

@anrao19 wrt build failures you mentioned at comment-1 and comment-2:

The run seeing the failure for https://tracker.ceph.com/issues/78822, out of the 3 PRs included in this QA run, I believe it's this PR causing the build-failure:

This PR's cherry-pick hit a conflict in src/test/neorados/CMakeLists.txt and completions.cc (noted in the commit message: Conflicts: missing earlier watch-notify changes), and int the conflict resolution; we seem to have kept the pre-existing add_executable/target_link_libraries block for ceph_test_neorados_completions and in addition appended the new patch's block; I think we should have merged them into one.

@cbodley would you mind taking a look?

@cbodley

cbodley commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

thanks @BBoozmen - i already pushed an update to address that, but it was buried in audit spam

@adamemerson adamemerson closed this Aug 4, 2026
@adamemerson adamemerson reopened this Aug 4, 2026
@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Aug 4, 2026
@adamemerson

Copy link
Copy Markdown
Contributor

jenkins test docs

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ceph Release Engineering Audit Report

Commit Parity Visualizer

BACKPORT PR #69744 SOURCE PR SOURCE STATUS
df8af3b osdc: deliver neorados completions to associated executor PR #69253 aabb5c7 osdc: deliver neorados completions to associated executor
c32c05a test/neorados: test cross-executor completions c4d9a40 test/neorados: test cross-executor completions
efc65ca tests/neorados: fix ceph_test_neorados_completions being not installed PR #69526 c183e27 tests/neorados: fix ceph_test_neorados_completions being not installed

Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations

⚠️ WARNING: Cherry-pick conflicts or deviations were found that require component lead review.

A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

This does not necessarily indicate an issue but a maintainer should review.

**Click to expand conflict summaries.**

Deviation in Backport c32c05a (cherry-pick of c4d9a40)

Affected File(s)

Range Diff

Click to expand
--- Original (c4d9a406)
+++ Backport (c32c05aa)
@@ -4,3 +4,9 @@
 delivered to the handler's associated executor
 
 Signed-off-by: Casey Bodley <[email protected]>
+(cherry picked from commit c4d9a406c8e9ed514067a37574dec88a794acd7c)
+
+Conflicts: missing earlier watch-notify changes
+	qa/workunits/rados/test.sh
+	src/test/neorados/CMakeLists.txt
+	src/test/neorados/completions.cc

================================================================================
RANGE DIFF
================================================================================

1:  c4d9a406c8e ! 1:  c32c05aacdb test/neorados: test cross-executor completions
    @@ Commit message
         delivered to the handler's associated executor
     
         Signed-off-by: Casey Bodley <[email protected]>
    +    (cherry picked from commit c4d9a406c8e9ed514067a37574dec88a794acd7c)
    +
    +    Conflicts: missing earlier watch-notify changes
    +            qa/workunits/rados/test.sh
    +            src/test/neorados/CMakeLists.txt
    +            src/test/neorados/completions.cc
     
      ## qa/workunits/rados/test.sh ##
    -@@ qa/workunits/rados/test.sh: RADOS_TESTS=(
    - )
    - 
    - NEORADOS_TESTS=(
    --    cls cmd handler_error io ec_io list ec_list misc pool
    -+    cls cmd completions handler_error io ec_io list ec_list misc pool
    -     read_operations snapshots watch_notify write_operations
    - )
    +@@ qa/workunits/rados/test.sh: do
    + done
      
    + for f in \
    +-    cls cmd handler_error io ec_io list ec_list misc pool read_operations snapshots \
    ++    cls cmd completions handler_error io ec_io list ec_list misc pool read_operations snapshots \
    +     watch_notify write_operations
    + do
    +     if [ $parallel -eq 1 ]; then
     
      ## src/test/neorados/CMakeLists.txt ##
     @@ src/test/neorados/CMakeLists.txt: add_executable(ceph_test_neorados_start_stop start_stop.cc)
    @@ src/test/neorados/CMakeLists.txt: add_executable(ceph_test_neorados_start_stop s
        ${unittest_libs})
      
     -add_executable(ceph_test_neorados_completions completions.cc)
    --target_link_libraries(ceph_test_neorados_completions Boost::boost pthread
    +-target_link_libraries(ceph_test_neorados_completions Boost::system pthread
     -  ${unittest_libs})
     -
      add_executable(ceph_test_neorados_op_speed op_speed.cc)
    @@ src/test/neorados/CMakeLists.txt: add_library(neoradostest-support STATIC common
      ## src/test/neorados/completions.cc ##
     @@
     -#include <boost/asio/io_context.hpp>
    --#include <boost/asio/post.hpp>
     +#include <optional>
     +#include <boost/asio/bind_executor.hpp>
     +#include "include/neorados/RADOS.hpp"
    @@ src/test/neorados/completions.cc
      
     -void nested_cb() {
     -  if (++completed < max_completions)
    --    boost::asio::post(c, &nested_cb);
    +-    c.post(&nested_cb);
     -}
     +        const char* pool_name = "ceph_test_neorados_completions";
     +        rados->lookup_pool(pool_name,
    @@ src/test/neorados/completions.cc
     +  rados->delete_pool(pool->get_pool(), boost::asio::detached);
      
     -int main(void) {
    --  boost::asio::post(c, &nested_cb);
    +-  c.post(&nested_cb);
     -  c.run();
     -  assert(completed == max_completions);
     -  return 0;

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Aug 4, 2026
@adamemerson

Copy link
Copy Markdown
Contributor

/audit override

@github-actions github-actions Bot added releng-audit-override and removed releng-audit-fail Release engineering: failed backport verification audit. labels Aug 5, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

✅ Audit Override Applied by @adamemerson.

View workflow run

@adamemerson

Copy link
Copy Markdown
Contributor

@cbodley Can you rebase this or something? We keep getting a 'QA Link' failure.

@batrick
batrick merged commit 6d3015c into ceph:squid Aug 5, 2026
11 of 14 checks passed
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.

8 participants