]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/sal: remove delete_obj_aio() and Completions 50169/head
authorCasey Bodley <cbodley@redhat.com>
Sun, 19 Feb 2023 01:03:16 +0000 (20:03 -0500)
committerCasey Bodley <cbodley@redhat.com>
Sun, 19 Feb 2023 01:03:16 +0000 (20:03 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_sal_rados.cc
src/rgw/driver/rados/rgw_sal_rados.h
src/rgw/rgw_sal.h
src/rgw/rgw_sal_daos.cc
src/rgw/rgw_sal_daos.h
src/rgw/rgw_sal_dbstore.cc
src/rgw/rgw_sal_dbstore.h
src/rgw/rgw_sal_filter.cc
src/rgw/rgw_sal_filter.h
src/rgw/rgw_sal_motr.cc
src/rgw/rgw_sal_motr.h

index 7b56b689d408c0e033a4b79a3801c9847f72a3c8..f8cc8d95f33fa5616529c751e1d62035f4bc7e4c 100644 (file)
@@ -136,11 +136,6 @@ static int drain_aio(std::list<librados::AioCompletion*>& handles)
   return ret;
 }
 
-int RadosCompletions::drain()
-{
-  return drain_aio(handles);
-}
-
 int RadosUser::list_buckets(const DoutPrefixProvider* dpp, const std::string& marker,
                               const std::string& end_marker, uint64_t max, bool need_stats,
                               BucketList &buckets, optional_yield y)
@@ -1273,11 +1268,6 @@ std::unique_ptr<Lifecycle> RadosStore::get_lifecycle(void)
   return std::make_unique<RadosLifecycle>(this);
 }
 
-std::unique_ptr<Completions> RadosStore::get_completions(void)
-{
-  return std::make_unique<RadosCompletions>();
-}
-
 std::unique_ptr<Notification> RadosStore::get_notification(
   rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s, rgw::notify::EventType event_type, optional_yield y, const std::string* object_name)
 {
@@ -1294,13 +1284,6 @@ int RadosStore::delete_raw_obj(const DoutPrefixProvider *dpp, const rgw_raw_obj&
   return rados->delete_raw_obj(dpp, obj);
 }
 
-int RadosStore::delete_raw_obj_aio(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, Completions* aio)
-{
-  RadosCompletions* raio = static_cast<RadosCompletions*>(aio);
-
-  return rados->delete_raw_obj_aio(dpp, obj, raio->handles);
-}
-
 void RadosStore::get_raw_obj(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj* raw_obj)
 {
     rados->obj_to_raw(placement_rule, obj, raw_obj);
@@ -2174,16 +2157,6 @@ int RadosObject::delete_object(const DoutPrefixProvider* dpp,
   return del_op.delete_obj(y, dpp);
 }
 
-int RadosObject::delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate,
-                                  Completions* aio, bool keep_index_consistent,
-                                  optional_yield y)
-{
-  RadosCompletions* raio = static_cast<RadosCompletions*>(aio);
-
-  return store->getRados()->delete_obj_aio(dpp, get_obj(), bucket->get_info(), astate,
-                                          raio->handles, keep_index_consistent, y);
-}
-
 int RadosObject::copy_object(User* user,
                                req_info* info,
                                const rgw_zone_id& source_zone,
index 0937d7bfbe175c1e7c7dce4de3657b64162f49fc..b4e417d9e27e867b23c1693d4e53b8f644d4e9d8 100644 (file)
@@ -29,14 +29,6 @@ namespace rgw { namespace sal {
 
 class RadosMultipartUpload;
 
-class RadosCompletions : public Completions {
-  public:
-    std::list<librados::AioCompletion*> handles;
-    RadosCompletions() {}
-    ~RadosCompletions() = default;
-    virtual int drain() override;
-};
-
 class RadosPlacementTier: public StorePlacementTier {
   RadosStore* store;
   RGWZoneGroupPlacementTier tier;
@@ -162,7 +154,6 @@ class RadosStore : public StoreDriver {
     virtual int list_all_zones(const DoutPrefixProvider* dpp, std::list<std::string>& zone_ids) override;
     virtual int cluster_stat(RGWClusterStat& stats) override;
     virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
-    virtual std::unique_ptr<Completions> get_completions(void) override;
     virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s, rgw::notify::EventType event_type, optional_yield y, const std::string* object_name=nullptr) override;
     virtual std::unique_ptr<Notification> get_notification(
     const DoutPrefixProvider* dpp, rgw::sal::Object* obj, rgw::sal::Object* src_obj, 
@@ -246,7 +237,6 @@ class RadosStore : public StoreDriver {
     int get_obj_head_ioctx(const DoutPrefixProvider *dpp, const RGWBucketInfo& bucket_info, const rgw_obj& obj,
                           librados::IoCtx* ioctx);
     int delete_raw_obj(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj);
-    int delete_raw_obj_aio(const DoutPrefixProvider *dpp, const rgw_raw_obj& obj, Completions* aio);
     void get_raw_obj(const rgw_placement_rule& placement_rule, const rgw_obj& obj, rgw_raw_obj* raw_obj);
     int get_raw_chunk_size(const DoutPrefixProvider* dpp, const rgw_raw_obj& obj, uint64_t* chunk_size);
 
@@ -393,8 +383,6 @@ class RadosObject : public StoreObject {
     }
     virtual int delete_object(const DoutPrefixProvider* dpp,
                              optional_yield y, bool prevent_versioning) override;
-    virtual int delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate, Completions* aio,
-                              bool keep_index_consistent, optional_yield y) override;
     virtual int copy_object(User* user,
                req_info* info, const rgw_zone_id& source_zone,
                rgw::sal::Object* dest_object, rgw::sal::Bucket* dest_bucket,
index 4a66acf52b6db9fa413af51ce5a8059562ba87f2..649236c227414c8d528a53565d105128767c0214 100644 (file)
@@ -244,14 +244,6 @@ class ObjectProcessor : public DataProcessor {
                        optional_yield y) = 0;
 };
 
-/** Base class for AIO completions */
-class Completions {
-  public:
-    Completions() {}
-    virtual ~Completions() = default;
-    virtual int drain() = 0;
-};
-
 /** A list of key-value attributes */
   using Attrs = std::map<std::string, ceph::buffer::list>;
 
@@ -323,8 +315,6 @@ class Driver {
     virtual int cluster_stat(RGWClusterStat& stats) = 0;
     /** Get a @a Lifecycle object. Used to manage/run lifecycle transitions */
     virtual std::unique_ptr<Lifecycle> get_lifecycle(void) = 0;
-    /** Get a @a Completions object.  Used for Async I/O tracking */
-    virtual std::unique_ptr<Completions> get_completions(void) = 0;
 
      /** Get a @a Notification object.  Used to communicate with non-RGW daemons, such as
       * management/tracking software */
@@ -937,9 +927,6 @@ class Object {
     virtual int delete_object(const DoutPrefixProvider* dpp,
                              optional_yield y,
                              bool prevent_versioning = false) = 0;
-    /** Asynchronous delete call */
-    virtual int delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate, Completions* aio,
-                              bool keep_index_consistent, optional_yield y) = 0;
     /** Copy an this object to another object. */
     virtual int copy_object(User* user,
                req_info* info, const rgw_zone_id& source_zone,
index b4e3cf93c98d9e6132c51d074178bcf54e217cf1..a8663805d828586486acd5d42969d4dff296a36d 100644 (file)
@@ -1229,13 +1229,6 @@ int DaosObject::delete_object(const DoutPrefixProvider* dpp, optional_yield y,
   return del_op.delete_obj(dpp, y);
 }
 
-int DaosObject::delete_obj_aio(const DoutPrefixProvider* dpp,
-                               RGWObjState* astate, Completions* aio,
-                               bool keep_index_consistent, optional_yield y) {
-  /* XXX: Make it async */
-  return DAOS_NOT_IMPLEMENTED_LOG(dpp);
-}
-
 int DaosObject::copy_object(
     User* user, req_info* info, const rgw_zone_id& source_zone,
     rgw::sal::Object* dest_object, rgw::sal::Bucket* dest_bucket,
@@ -2341,11 +2334,6 @@ std::unique_ptr<Lifecycle> DaosStore::get_lifecycle(void) {
   return 0;
 }
 
-std::unique_ptr<Completions> DaosStore::get_completions(void) {
-  DAOS_NOT_IMPLEMENTED_LOG(nullptr);
-  return 0;
-}
-
 std::unique_ptr<Notification> DaosStore::get_notification(
     rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
     rgw::notify::EventType event_type, const std::string* object_name) {
index 83799e28fafb90a35f16c787d39e8f996ba6d6cd..ac7352191f23cc613a664ac1b441b85b1ae51ede 100644 (file)
@@ -604,9 +604,6 @@ class DaosObject : public StoreObject {
 
   virtual int delete_object(const DoutPrefixProvider* dpp, optional_yield y,
                             bool prevent_versioning = false) override;
-  virtual int delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate,
-                             Completions* aio, bool keep_index_consistent,
-                             optional_yield y) override;
   virtual int copy_object(
       User* user, req_info* info, const rgw_zone_id& source_zone,
       rgw::sal::Object* dest_object, rgw::sal::Bucket* dest_bucket,
@@ -925,7 +922,6 @@ class DaosStore : public StoreDriver {
   virtual std::string zone_unique_trans_id(const uint64_t unique_num) override;
   virtual int cluster_stat(RGWClusterStat& stats) override;
   virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
-  virtual std::unique_ptr<Completions> get_completions(void) override;
   virtual std::unique_ptr<Notification> get_notification(
       rgw::sal::Object* obj, rgw::sal::Object* src_obj, struct req_state* s,
       rgw::notify::EventType event_type, optional_yield y,
index 65cf82cbaea52556c8ac85e1df49f68c5cd783ff..4147006abf27776212f555e9fcb181c415ee4985 100644 (file)
@@ -838,14 +838,6 @@ namespace rgw::sal {
     return del_op.delete_obj(dpp);
   }
 
-  int DBObject::delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate,
-      Completions* aio, bool keep_index_consistent,
-      optional_yield y)
-  {
-    /* XXX: Make it async */
-    return 0;
-  }
-
   int DBObject::copy_object(User* user,
       req_info* info,
       const rgw_zone_id& source_zone,
@@ -1758,11 +1750,6 @@ namespace rgw::sal {
     return std::make_unique<DBLifecycle>(this);
   }
 
-  std::unique_ptr<Completions> DBStore::get_completions(void)
-  {
-    return 0;
-  }
-
   int DBLifecycle::get_entry(const std::string& oid, const std::string& marker,
                              std::unique_ptr<LCEntry>* entry)
   {
index 08e1cf516d4c18218d5a7eea8417305390690fdc..c82c65e6f73c5095b127b6eaf018421883047162 100644 (file)
@@ -584,8 +584,6 @@ protected:
       virtual int delete_object(const DoutPrefixProvider* dpp,
           optional_yield y,
           bool prevent_versioning = false) override;
-      virtual int delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate, Completions* aio,
-          bool keep_index_consistent, optional_yield y) override;
       virtual int copy_object(User* user,
           req_info* info, const rgw_zone_id& source_zone,
           rgw::sal::Object* dest_object, rgw::sal::Bucket* dest_bucket,
@@ -805,7 +803,6 @@ public:
       virtual int list_all_zones(const DoutPrefixProvider* dpp, std::list<std::string>& zone_ids) override;
       virtual int cluster_stat(RGWClusterStat& stats) override;
       virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
-      virtual std::unique_ptr<Completions> get_completions(void) override;
 
   virtual std::unique_ptr<Notification> get_notification(
     rgw::sal::Object* obj, rgw::sal::Object* src_obj, req_state* s,
index 367b23db25bad25a99608356f7758507334771f4..b57c664e2ea062476b9f2d64795de5d30c249b2d 100644 (file)
@@ -267,12 +267,6 @@ std::unique_ptr<Lifecycle> FilterDriver::get_lifecycle(void)
   return std::make_unique<FilterLifecycle>(std::move(lc));
 }
 
-std::unique_ptr<Completions> FilterDriver::get_completions(void)
-{
-  std::unique_ptr<Completions> c = next->get_completions();
-  return std::make_unique<FilterCompletions>(std::move(c));
-}
-
 std::unique_ptr<Notification> FilterDriver::get_notification(rgw::sal::Object* obj,
                                rgw::sal::Object* src_obj, req_state* s,
                                rgw::notify::EventType event_type, optional_yield y,
@@ -857,13 +851,6 @@ int FilterObject::delete_object(const DoutPrefixProvider* dpp,
   return next->delete_object(dpp, y, prevent_versioning);
 }
 
-int FilterObject::delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate,
-                                Completions* aio, bool keep_index_consistent,
-                                optional_yield y)
-{
-  return next->delete_obj_aio(dpp, astate, aio, keep_index_consistent, y);
-}
-
 int FilterObject::copy_object(User* user,
                              req_info* info,
                              const rgw_zone_id& source_zone,
index 537640edd498a6ad4ab46ff6dafd07ca1c3f2d04..a2a1d8e14bcf2fe3965e629ca9ea8bc4f52abf22 100644 (file)
 
 namespace rgw { namespace sal {
 
-class FilterCompletions : public Completions {
-protected:
-  std::unique_ptr<Completions> next;
-
-public:
-  FilterCompletions(std::unique_ptr<Completions> _next) : next(std::move(_next)) {}
-  virtual ~FilterCompletions() = default;
-  virtual int drain() override { return next->drain(); }
-};
-
 class FilterPlacementTier : public PlacementTier {
 protected:
   std::unique_ptr<PlacementTier> next;
@@ -198,7 +188,6 @@ public:
   }
   virtual int cluster_stat(RGWClusterStat& stats) override;
   virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
-  virtual std::unique_ptr<Completions> get_completions(void) override;
 
   virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj,
                                 rgw::sal::Object* src_obj, struct req_state* s,
@@ -561,9 +550,6 @@ public:
   virtual int delete_object(const DoutPrefixProvider* dpp,
                            optional_yield y,
                            bool prevent_versioning = false) override;
-  virtual int delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate,
-                            Completions* aio,
-                            bool keep_index_consistent, optional_yield y) override;
   virtual int copy_object(User* user,
                req_info* info, const rgw_zone_id& source_zone,
               rgw::sal::Object* dest_object, rgw::sal::Bucket* dest_bucket,
index 724f6f0f708728577bfea5fe451b0fc025ad6576..f73aa7c84d86014ddfcf19e7711e939f41c11a21 100644 (file)
@@ -1540,14 +1540,6 @@ int MotrObject::delete_object(const DoutPrefixProvider* dpp, optional_yield y, b
   return del_op.delete_obj(dpp, y);
 }
 
-int MotrObject::delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate,
-    Completions* aio, bool keep_index_consistent,
-    optional_yield y)
-{
-  /* XXX: Make it async */
-  return 0;
-}
-
 int MotrObject::copy_object(User* user,
     req_info* info,
     const rgw_zone_id& source_zone,
@@ -3362,11 +3354,6 @@ std::unique_ptr<Lifecycle> MotrStore::get_lifecycle(void)
   return 0;
 }
 
-std::unique_ptr<Completions> MotrStore::get_completions(void)
-{
-  return 0;
-}
-
 std::unique_ptr<Notification> MotrStore::get_notification(Object* obj, Object* src_obj, req_state* s,
     rgw::notify::EventType event_type, optional_yield y, const string* object_name)
 {
index e4659afb812f8916bbcfc490aa65e1e85bce00e0..df694712e203adf6d39e0c12d1a785d8e50e9cdf 100644 (file)
@@ -674,8 +674,6 @@ class MotrObject : public StoreObject {
     virtual int delete_object(const DoutPrefixProvider* dpp,
         optional_yield y,
         bool prevent_versioning = false) override;
-    virtual int delete_obj_aio(const DoutPrefixProvider* dpp, RGWObjState* astate, Completions* aio,
-        bool keep_index_consistent, optional_yield y) override;
     virtual int copy_object(User* user,
         req_info* info, const rgw_zone_id& source_zone,
         rgw::sal::Object* dest_object, rgw::sal::Bucket* dest_bucket,
@@ -1007,7 +1005,6 @@ class MotrStore : public StoreDriver {
     virtual int list_all_zones(const DoutPrefixProvider* dpp, std::list<std::string>& zone_ids) override;
     virtual int cluster_stat(RGWClusterStat& stats) override;
     virtual std::unique_ptr<Lifecycle> get_lifecycle(void) override;
-    virtual std::unique_ptr<Completions> get_completions(void) override;
     virtual std::unique_ptr<Notification> get_notification(rgw::sal::Object* obj, rgw::sal::Object* src_obj,
         req_state* s, rgw::notify::EventType event_type, optional_yield y, const std::string* object_name=nullptr) override;
     virtual std::unique_ptr<Notification> get_notification(const DoutPrefixProvider* dpp, rgw::sal::Object* obj,