From f7a748439657ab6e7df8cedc4b17d27abc5cd7f8 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 8 Mar 2024 15:01:08 -0500 Subject: [PATCH] rgw/pubsub: make v2-specific calls private Signed-off-by: Casey Bodley (cherry picked from commit 0d61382f4fd52e2e76ab8c02f905c2fb7367c31d) --- src/rgw/rgw_pubsub.cc | 8 ++++---- src/rgw/rgw_pubsub.h | 25 +++++++++++++------------ 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/rgw/rgw_pubsub.cc b/src/rgw/rgw_pubsub.cc index 15e9ad7616b..8ac50001833 100644 --- a/src/rgw/rgw_pubsub.cc +++ b/src/rgw/rgw_pubsub.cc @@ -954,9 +954,9 @@ int RGWPubSub::Bucket::remove_notifications(const DoutPrefixProvider *dpp, optio return 0; } -int RGWPubSub::create_topic(const DoutPrefixProvider* dpp, - const rgw_pubsub_topic& topic, - optional_yield y) const { +int RGWPubSub::create_topic_v2(const DoutPrefixProvider* dpp, + const rgw_pubsub_topic& topic, + optional_yield y) const { RGWObjVersionTracker objv_tracker; objv_tracker.generate_new_write_ver(dpp->get_cct()); constexpr bool exclusive = false; @@ -988,7 +988,7 @@ int RGWPubSub::create_topic(const DoutPrefixProvider* dpp, new_topic.arn = arn; new_topic.opaque_data = opaque_data; new_topic.policy_text = policy_text; - return create_topic(dpp, new_topic, y); + return create_topic_v2(dpp, new_topic, y); } RGWObjVersionTracker objv_tracker; rgw_pubsub_topics topics; diff --git a/src/rgw/rgw_pubsub.h b/src/rgw/rgw_pubsub.h index 6891c6ebd15..c394846f901 100644 --- a/src/rgw/rgw_pubsub.h +++ b/src/rgw/rgw_pubsub.h @@ -562,6 +562,19 @@ class RGWPubSub int write_topics_v1(const DoutPrefixProvider *dpp, const rgw_pubsub_topics& topics, RGWObjVersionTracker* objv_tracker, optional_yield y) const; + // remove a topic according to its name + // if the topic does not exists it is a no-op (considered success) + // return 0 on success, error code otherwise + int remove_topic_v2(const DoutPrefixProvider* dpp, + const std::string& name, + optional_yield y) const; + // create a topic with a name only + // if the topic already exists it is a no-op (considered success) + // return 0 on success, error code otherwise + int create_topic_v2(const DoutPrefixProvider* dpp, + const rgw_pubsub_topic& topic, + optional_yield y) const; + public: RGWPubSub(rgw::sal::Driver* _driver, const std::string& _tenant, @@ -641,18 +654,6 @@ public: // if the topic does not exists it is a no-op (considered success) // return 0 on success, error code otherwise int remove_topic(const DoutPrefixProvider *dpp, const std::string& name, optional_yield y) const; - // remove a topic according to its name - // if the topic does not exists it is a no-op (considered success) - // return 0 on success, error code otherwise - int remove_topic_v2(const DoutPrefixProvider* dpp, - const std::string& name, - optional_yield y) const; - // create a topic with a name only - // if the topic already exists it is a no-op (considered success) - // return 0 on success, error code otherwise - int create_topic(const DoutPrefixProvider* dpp, - const rgw_pubsub_topic& topic, - optional_yield y) const; }; namespace rgw::notify { -- 2.39.5