]> git.apps.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, 9 Oct 2025 15:00:40 +0000 (11:00 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
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 0fd7a8bca4739b1b9d4dd5ec6875f239aa5643b7..0b6dabe0a7187570db68d764b18f1e9fda1a9306 100644 (file)
@@ -152,7 +152,6 @@ list(APPEND librgw_common_srcs
 
 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
index 2865885f0f76c459de735dd63d3c89a9d80c03a6..dbd86426c8ef6dc387e31bca4971df686cea018e 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"
@@ -57,7 +56,6 @@ int RGWServices_Def::init(CephContext *cct,
                           rgw::sal::ConfigStore* cfgstore,
                           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);
@@ -82,7 +80,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());
@@ -115,21 +112,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;
@@ -247,7 +237,6 @@ void RGWServices_Def::shutdown()
   bi_rados->shutdown();
   bucket_sync_sobj->shutdown();
   bucket_sobj->shutdown();
-  finisher->shutdown();
 
   sysobj->shutdown();
   sysobj_core->shutdown();
@@ -273,7 +262,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 8005dc1af14cc2c0c0b363d89d4bff46a64c2d50..96fe99c367fd02f932a21ffce55b00bf817c677c 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;
@@ -122,7 +120,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 64bb636..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*-
-// vim: ts=8 sw=2 sts=2 expandtab 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 6ddc6bf..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*-
-// vim: ts=8 sw=2 sts=2 expandtab 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);
-};