]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: remove unused RGWSI_Finisher
authorCasey Bodley <cbodley@redhat.com>
Fri, 3 Oct 2025 20:15:24 +0000 (16:15 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 21 May 2026 15:32:45 +0000 (11:32 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 137d2094a456c8ff828b8953785eff415c2acd1c)

Conflicts:
src/rgw/CMakeLists.txt no WITH_RADOSGW_RADOS on tentacle

src/rgw/CMakeLists.txt
src/rgw/driver/rados/rgw_service.cc
src/rgw/driver/rados/rgw_service.h
src/rgw/services/svc_finisher.cc [deleted file]
src/rgw/services/svc_finisher.h [deleted file]

index f11a3913ce5ce15f292a74cbf2ae9097c23377f7..544a54c61c624e214ea1c0327d5d44f916715054 100644 (file)
@@ -36,7 +36,6 @@ endfunction()
 find_package(ICU 52.0 COMPONENTS uc REQUIRED)
 
 set(librgw_common_srcs
-  services/svc_finisher.cc
   services/svc_bi_rados.cc
   services/svc_bilog_rados.cc
   services/svc_bucket.cc
index afc12d5f20569550c336189baba59f46862f4a5a..73291ee041d650bb6b4c4a514325e0e6ea6807a7 100644 (file)
@@ -3,7 +3,6 @@
 
 #include "rgw_service.h"
 
-#include "services/svc_finisher.h"
 #include "services/svc_bi_rados.h"
 #include "services/svc_bilog_rados.h"
 #include "services/svc_bucket_sobj.h"
@@ -56,7 +55,6 @@ int RGWServices_Def::init(CephContext *cct,
                           const DoutPrefixProvider *dpp,
                           const rgw::SiteConfig* site)
 {
-  finisher = std::make_unique<RGWSI_Finisher>(cct);
   bucket_sobj = std::make_unique<RGWSI_Bucket_SObj>(cct);
   bucket_sync_sobj = std::make_unique<RGWSI_Bucket_Sync_SObj>(cct);
   bi_rados = std::make_unique<RGWSI_BucketIndex_RADOS>(cct);
@@ -81,7 +79,6 @@ int RGWServices_Def::init(CephContext *cct,
   }
 
   async_processor->start();
-  finisher->init();
   bi_rados->init(zone.get(), driver->getRados()->get_rados_handle(),
                 bilog_rados.get(), datalog_rados.get());
   bilog_rados->init(bi_rados.get());
@@ -114,21 +111,14 @@ int RGWServices_Def::init(CephContext *cct,
 
   can_shutdown = true;
 
-  int r = finisher->start(y, dpp);
-  if (r < 0) {
-    ldpp_dout(dpp, 0) << "ERROR: failed to start finisher service (" << cpp_strerror(-r) << dendl;
-    return r;
-  }
-
+  int r = 0;
   if (!raw) {
     r = notify->start(y, dpp);
     if (r < 0) {
       ldpp_dout(dpp, 0) << "ERROR: failed to start notify service (" << cpp_strerror(-r) << dendl;
       return r;
     }
-  }
 
-  if (!raw) {
     r = zone->start(y, dpp);
     if (r < 0) {
       ldpp_dout(dpp, 0) << "ERROR: failed to start zone service (" << cpp_strerror(-r) << dendl;
@@ -246,7 +236,6 @@ void RGWServices_Def::shutdown()
   bi_rados->shutdown();
   bucket_sync_sobj->shutdown();
   bucket_sobj->shutdown();
-  finisher->shutdown();
 
   sysobj->shutdown();
   sysobj_core->shutdown();
@@ -272,7 +261,6 @@ int RGWServices::do_init(CephContext *_cct, rgw::sal::RadosStore* driver, bool h
     return r;
   }
 
-  finisher = _svc.finisher.get();
   bi_rados = _svc.bi_rados.get();
   bi = bi_rados;
   bilog_rados = _svc.bilog_rados.get();
index 8c0a96fe9b32f24662753fd368958a5964002f9d..d7ed9f49c07a486ee949ba5bb276020d0b76484a 100644 (file)
@@ -53,7 +53,6 @@ public:
   }
 };
 
-class RGWSI_Finisher;
 class RGWSI_Bucket;
 class RGWSI_Bucket_SObj;
 class RGWSI_Bucket_Sync;
@@ -84,7 +83,6 @@ struct RGWServices_Def
   bool can_shutdown{false};
   bool has_shutdown{false};
 
-  std::unique_ptr<RGWSI_Finisher> finisher;
   std::unique_ptr<RGWSI_Bucket_SObj> bucket_sobj;
   std::unique_ptr<RGWSI_Bucket_Sync_SObj> bucket_sync_sobj;
   std::unique_ptr<RGWSI_BucketIndex_RADOS> bi_rados;
@@ -123,7 +121,6 @@ struct RGWServices
   CephContext *cct;
   const rgw::SiteConfig* site{nullptr};
 
-  RGWSI_Finisher *finisher{nullptr};
   RGWSI_Bucket *bucket{nullptr};
   RGWSI_Bucket_SObj *bucket_sobj{nullptr};
   RGWSI_Bucket_Sync *bucket_sync{nullptr};
diff --git a/src/rgw/services/svc_finisher.cc b/src/rgw/services/svc_finisher.cc
deleted file mode 100644 (file)
index 4883c7c..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- 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"
-
-#include "svc_finisher.h"
-
-using namespace std;
-
-int RGWSI_Finisher::do_start(optional_yield, const DoutPrefixProvider *dpp)
-{
-  finisher = new Finisher(cct);
-  finisher->start();
-
-  return 0;
-}
-
-void RGWSI_Finisher::shutdown()
-{
-  if (finalized) {
-    return;
-  }
-
-  if (finisher) {
-    finisher->stop();
-
-    map<int, ShutdownCB *> cbs;
-    cbs.swap(shutdown_cbs); /* move cbs out, in case caller unregisters */
-    for (auto& iter : cbs) {
-      iter.second->call();
-    }
-    delete finisher;
-  }
-
-  finalized = true;
-}
-
-RGWSI_Finisher::~RGWSI_Finisher()
-{
-  shutdown();
-}
-
-void RGWSI_Finisher::register_caller(ShutdownCB *cb, int *phandle)
-{
-  *phandle = ++handles_counter;
-  shutdown_cbs[*phandle] = cb;
-}
-
-void RGWSI_Finisher::unregister_caller(int handle)
-{
-  shutdown_cbs.erase(handle);
-}
-
-void RGWSI_Finisher::schedule_context(Context *c)
-{
-  finisher->queue(c);
-}
-
diff --git a/src/rgw/services/svc_finisher.h b/src/rgw/services/svc_finisher.h
deleted file mode 100644 (file)
index 911b48f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
-// vim: ts=8 sw=2 smarttab ft=cpp
-
-#pragma once
-
-#include "rgw_service.h"
-
-class Context;
-class Finisher;
-
-class RGWSI_Finisher : public RGWServiceInstance
-{
-  friend struct RGWServices_Def;
-public:
-  class ShutdownCB;
-
-private:
-  Finisher *finisher{nullptr};
-  bool finalized{false};
-
-  void shutdown() override;
-
-  std::map<int, ShutdownCB *> shutdown_cbs;
-  std::atomic<int> handles_counter{0};
-
-protected:
-  void init() {}
-  int do_start(optional_yield y, const DoutPrefixProvider *dpp) override;
-
-public:
-  RGWSI_Finisher(CephContext *cct): RGWServiceInstance(cct) {}
-  ~RGWSI_Finisher();
-
-  class ShutdownCB {
-  public:
-      virtual ~ShutdownCB() {}
-      virtual void call() = 0;
-  };
-
-  void register_caller(ShutdownCB *cb, int *phandle);
-  void unregister_caller(int handle);
-
-  void schedule_context(Context *c);
-};