Repository navigation
tentacle: rgw: RGWSI_Notify drains the finisher before deleting RGWWatchers - #66522
Conversation
|
additional cherry-pick of cd0b62f helped reduce conflicts |
|
Removing needs-qa until we have notifiaction/multisite fixes backported to tentacle. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
init_watch() and finalize_watch() use spawn_throttle for concurrent operations, so need to spawn a parent coroutine unless init_watch() already has one Signed-off-by: Casey Bodley <[email protected]> (cherry picked from commit cd0b62f)
RGWSI_Notify is the only user of RGWSI_Finisher, but doesn't "own" it. this means RGWSI_Notify can't drain/stop the Finisher on shutdown to guarantee the lifetime of contexts like C_ReinitWatch that it schedules there replace the use of RGWSI_Finisher with direct ownership of Finisher, and drain/stop it at the end of RGWSI_Notify::shutdown() Signed-off-by: Casey Bodley <[email protected]> (cherry picked from commit 4aa6ed8)
the `C_ReinitWatch` context stores a pointer to `RGWWatcher *watcher` `RGWSI_Notify` schedules `C_ReinitWatch` callbacks to run on this finisher thread, which can race with the destruction of those `RGWWatchers` in `RGWSI_Notify::finalize_watch()` to avoid this race, delay the `RGWWatcher` deletions until after we've drained/stopped the Finisher thread in `RGWSI_Notify::shutdown()` Fixes: https://tracker.ceph.com/issues/73361 Signed-off-by: Casey Bodley <[email protected]> (cherry picked from commit 732a937)
Signed-off-by: Casey Bodley <[email protected]> (cherry picked from commit 137d209) Conflicts: src/rgw/CMakeLists.txt no WITH_RADOSGW_RADOS on tentacle
avoid allocating, initializing, and shutting down RGWSI_Notify if we
aren't going to start or use it
calling RGWSI_Notify::shutdown() without first calling
RGWSI_Notify::do_start() aborts in Finisher::stop() with:
> ceph_abort_msg("join on thread that was never started")
Signed-off-by: Casey Bodley <[email protected]>
(cherry picked from commit 3b7b7da)
Conflicts:
src/rgw/driver/rados/rgw_service.cc
RGWSI_MDLog doesn't take cfgstore/site
RGWSI_Notify is only used internally by RGWSI_SysObj_Cache where the dependency is injected to RGWSI_SysObj_Cache::init(). there's no need to expose a pointer to RGWSI_Notify to the rest of the application, especially now that it can be a nullptr Signed-off-by: Casey Bodley <[email protected]> (cherry picked from commit dfc379c)
12ae29f to
80920c2
Compare
There was a problem hiding this comment.
Automated Backport Parity Review
Discrepancies detected between the backport PR and the original source PR(s). Please see the Commit Parity Visualizer below.
Automated Backport Parity Review - Backport Deviation Alert
A conflict or unapproved 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.
Deviation in Backport c9ccee1 (cherry-pick of 137d209)
Affected File(s)
src/rgw/CMakeLists.txtsrc/rgw/services/svc_finisher.ccsrc/rgw/services/svc_finisher.h
Range Diff
Click to expand
--- Original (137d2094)
+++ Backport (c9ccee18)
@@ -1,3 +1,7 @@
rgw: remove unused RGWSI_Finisher
Signed-off-by: Casey Bodley <[email protected]>
+(cherry picked from commit 137d2094a456c8ff828b8953785eff415c2acd1c)
+
+Conflicts:
+ src/rgw/CMakeLists.txt no WITH_RADOSGW_RADOS on tentacle
================================================================================
RANGE DIFF
================================================================================
1: 137d2094a45 ! 1: c9ccee18970 rgw: remove unused RGWSI_Finisher
@@ Commit message
rgw: remove unused RGWSI_Finisher
Signed-off-by: Casey Bodley <[email protected]>
+ (cherry picked from commit 137d2094a456c8ff828b8953785eff415c2acd1c)
+
+ Conflicts:
+ src/rgw/CMakeLists.txt no WITH_RADOSGW_RADOS on tentacle
## src/rgw/CMakeLists.txt ##
-@@ src/rgw/CMakeLists.txt: list(APPEND librgw_common_srcs
+@@ src/rgw/CMakeLists.txt: endfunction()
+ find_package(ICU 52.0 COMPONENTS uc REQUIRED)
- if(WITH_RADOSGW_RADOS)
- list(APPEND librgw_common_srcs
-- services/svc_finisher.cc
- services/svc_bi_rados.cc
- services/svc_bilog_rados.cc
- services/svc_bucket.cc
+ set(librgw_common_srcs
+- services/svc_finisher.cc
+ services/svc_bi_rados.cc
+ services/svc_bilog_rados.cc
+ services/svc_bucket.cc
## src/rgw/driver/rados/rgw_service.cc ##
@@
@@ src/rgw/driver/rados/rgw_service.cc
#include "services/svc_bilog_rados.h"
#include "services/svc_bucket_sobj.h"
@@ src/rgw/driver/rados/rgw_service.cc: int RGWServices_Def::init(CephContext *cct,
- rgw::sal::ConfigStore* cfgstore,
+ const DoutPrefixProvider *dpp,
const rgw::SiteConfig* site)
{
- finisher = std::make_unique<RGWSI_Finisher>(cct);
@@ src/rgw/driver/rados/rgw_service.h: struct RGWServices
## src/rgw/services/svc_finisher.cc (deleted) ##
@@
--// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*-
--// vim: ts=8 sw=2 sts=2 expandtab ft=cpp
+-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+-// vim: ts=8 sw=2 smarttab ft=cpp
-
-#include "common/Finisher.h"
-
@@ src/rgw/services/svc_finisher.cc (deleted)
## src/rgw/services/svc_finisher.h (deleted) ##
@@
--// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*-
--// vim: ts=8 sw=2 sts=2 expandtab ft=cpp
+-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
+-// vim: ts=8 sw=2 smarttab ft=cpp
-
-#pragma once
-Deviation in Backport 9cab03d (cherry-pick of 3b7b7da)
Affected File(s)
src/rgw/driver/rados/rgw_service.cc
Range Diff
Click to expand
--- Original (3b7b7dae)
+++ Backport (9cab03d8)
@@ -8,3 +8,8 @@
> ceph_abort_msg("join on thread that was never started")
Signed-off-by: Casey Bodley <[email protected]>
+(cherry picked from commit 3b7b7dae9b76a0666d47302f031a305604eeddc4)
+
+Conflicts:
+ src/rgw/driver/rados/rgw_service.cc
+ RGWSI_MDLog doesn't take cfgstore/site
================================================================================
RANGE DIFF
================================================================================
1: 3b7b7dae9b7 ! 1: 9cab03d8fb9 rgw/services: don't allocate RGWSI_Notify unless its used
@@ Commit message
> ceph_abort_msg("join on thread that was never started")
Signed-off-by: Casey Bodley <[email protected]>
+ (cherry picked from commit 3b7b7dae9b76a0666d47302f031a305604eeddc4)
+
+ Conflicts:
+ src/rgw/driver/rados/rgw_service.cc
+ RGWSI_MDLog doesn't take cfgstore/site
## src/rgw/driver/rados/rgw_service.cc ##
@@ src/rgw/driver/rados/rgw_service.cc: int RGWServices_Def::init(CephContext *cct,
config_key_rados = std::make_unique<RGWSI_ConfigKey_RADOS>(cct);
datalog_rados = std::make_unique<RGWDataChangesLog>(driver);
- mdlog = std::make_unique<RGWSI_MDLog>(cct, run_sync, cfgstore);
+ mdlog = std::make_unique<RGWSI_MDLog>(cct, run_sync);
- notify = std::make_unique<RGWSI_Notify>(cct);
+ if (have_cache) {
+ notify = std::make_unique<RGWSI_Notify>(cct);
+ }
- zone = std::make_unique<RGWSI_Zone>(cct, cfgstore, site);
+ zone = std::make_unique<RGWSI_Zone>(cct, site);
zone_utils = std::make_unique<RGWSI_ZoneUtils>(cct);
quota = std::make_unique<RGWSI_Quota>(cct);
@@ src/rgw/driver/rados/rgw_service.cc: int RGWServices_Def::init(CephContext *cct,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.
Automated Redmine Linkage Audit
The following tracking irregularities were found:
- Missing PR Link: Backport tracker #72468 has no 'Pull Request ID' field set. Please link it to PR #66522.
Commit Parity Visualizer
| BACKPORT PR #66522 | SOURCE PR | SOURCE STATUS |
|---|---|---|
| f158164 rgw: RGWSI_Notify spawns a coroutine on null_yield | PR #64624 | cd0b62f rgw: RGWSI_Notify spawns a coroutine on null_yield |
| <<<< MISSING IN BACKPORT >>>> | 60ba07a rgw: RGWDeleteMultiObj spawns a coroutine on null_yield | |
| <<<< MISSING IN BACKPORT >>>> | 1cefcae common/async: remove null_yield support for max_concurrent_for_each() | |
| <<<< MISSING IN BACKPORT >>>> | 4956c63 common/async: remove null_yield support for spawn_throttle | |
| <<<< MISSING IN BACKPORT >>>> | c2e0c15 common/async: fold async_spawn_throttle_impl into spawn_throttle_impl | |
| 449b5f4 rgw: RGWSI_Notify uses Finisher instead of RGWSI_Finisher | PR #65775 | 4aa6ed8 rgw: RGWSI_Notify uses Finisher instead of RGWSI_Finisher |
| eb00b6a rgw: RGWSI_Notify drains the finisher before deleting RGWWatchers | 732a937 rgw: RGWSI_Notify drains the finisher before deleting RGWWatchers | |
| c9ccee1 rgw: remove unused RGWSI_Finisher | 137d209 rgw: remove unused RGWSI_Finisher | |
| 9cab03d rgw/services: don't allocate RGWSI_Notify unless its used | 3b7b7da rgw/services: don't allocate RGWSI_Notify unless its used | |
| 80920c2 rgw/services: don't expose RGWServices::notify | dfc379c rgw/services: don't expose RGWServices::notify |
🛟 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.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
CI Run Log: View Workflow Details
sorry, not reading all of that. but i documented Conflicts in the commit message, and commented above about the additional commit:
|
|
pr testing completed and approved by @ivancich , more details : https://tracker.ceph.com/issues/76985. |
backport tracker: https://tracker.ceph.com/issues/74105
backport of #65775
parent tracker: https://tracker.ceph.com/issues/73361
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh