From: Casey Bodley Date: Tue, 3 Oct 2023 18:13:24 +0000 (-0400) Subject: rgw/sal: remove ZoneGroup::get_endpoint() X-Git-Tag: v19.0.0~122^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e344c7c51e06e26bf3f06252d1b306ebb16dda8;p=ceph.git rgw/sal: remove ZoneGroup::get_endpoint() Signed-off-by: Casey Bodley --- diff --git a/src/rgw/driver/daos/rgw_sal_daos.cc b/src/rgw/driver/daos/rgw_sal_daos.cc index a6aacf024b3..8be268fe17c 100644 --- a/src/rgw/driver/daos/rgw_sal_daos.cc +++ b/src/rgw/driver/daos/rgw_sal_daos.cc @@ -800,19 +800,6 @@ int DaosStore::initialize(CephContext* cct, const DoutPrefixProvider* dpp) { return ret; } -const std::string& DaosZoneGroup::get_endpoint() const { - if (!group.endpoints.empty()) { - return group.endpoints.front(); - } else { - // use zonegroup's master zone endpoints - auto z = group.zones.find(group.master_zone); - if (z != group.zones.end() && !z->second.endpoints.empty()) { - return z->second.endpoints.front(); - } - } - return empty; -} - bool DaosZoneGroup::placement_target_exists(std::string& target) const { return !!group.placement_targets.count(target); } diff --git a/src/rgw/driver/daos/rgw_sal_daos.h b/src/rgw/driver/daos/rgw_sal_daos.h index 72d3bdb6cfb..4d5e6c83107 100644 --- a/src/rgw/driver/daos/rgw_sal_daos.h +++ b/src/rgw/driver/daos/rgw_sal_daos.h @@ -402,8 +402,6 @@ class DaosZoneGroup : public StoreZoneGroup { virtual int equals(const std::string& other_zonegroup) const override { return group.equals(other_zonegroup); }; - /** Get the endpoint from zonegroup, or from master zone if not set */ - virtual const std::string& get_endpoint() const override; virtual bool placement_target_exists(std::string& target) const override; virtual bool is_master_zonegroup() const override { return group.is_master_zonegroup(); diff --git a/src/rgw/driver/motr/rgw_sal_motr.cc b/src/rgw/driver/motr/rgw_sal_motr.cc index b53516bb065..d6a5eb1bc3e 100644 --- a/src/rgw/driver/motr/rgw_sal_motr.cc +++ b/src/rgw/driver/motr/rgw_sal_motr.cc @@ -1047,20 +1047,6 @@ void MotrStore::finalize(void) m0_client_fini(this->instance, true); } -const std::string& MotrZoneGroup::get_endpoint() const -{ - if (!group.endpoints.empty()) { - return group.endpoints.front(); - } else { - // use zonegroup's master zone endpoints - auto z = group.zones.find(group.master_zone); - if (z != group.zones.end() && !z->second.endpoints.empty()) { - return z->second.endpoints.front(); - } - } - return empty; -} - bool MotrZoneGroup::placement_target_exists(std::string& target) const { return !!group.placement_targets.count(target); diff --git a/src/rgw/driver/motr/rgw_sal_motr.h b/src/rgw/driver/motr/rgw_sal_motr.h index 7935462ac3f..66ca8314fc0 100644 --- a/src/rgw/driver/motr/rgw_sal_motr.h +++ b/src/rgw/driver/motr/rgw_sal_motr.h @@ -440,8 +440,6 @@ public: virtual int equals(const std::string& other_zonegroup) const override { return group.equals(other_zonegroup); }; - /** Get the endpoint from zonegroup, or from master zone if not set */ - virtual const std::string& get_endpoint() const override; virtual bool placement_target_exists(std::string& target) const override; virtual bool is_master_zonegroup() const override { return group.is_master_zonegroup(); diff --git a/src/rgw/driver/rados/rgw_sal_rados.cc b/src/rgw/driver/rados/rgw_sal_rados.cc index fd8964e83ba..68b6d998eca 100644 --- a/src/rgw/driver/rados/rgw_sal_rados.cc +++ b/src/rgw/driver/rados/rgw_sal_rados.cc @@ -2980,20 +2980,6 @@ int RadosMultipartWriter::complete(size_t accounted_size, const std::string& eta if_match, if_nomatch, user_data, zones_trace, canceled, rctx); } -const std::string& RadosZoneGroup::get_endpoint() const -{ - if (!group.endpoints.empty()) { - return group.endpoints.front(); - } else { - // use zonegroup's master zone endpoints - auto z = group.zones.find(group.master_zone); - if (z != group.zones.end() && !z->second.endpoints.empty()) { - return z->second.endpoints.front(); - } - } - return empty; -} - bool RadosZoneGroup::placement_target_exists(std::string& target) const { return !!group.placement_targets.count(target); diff --git a/src/rgw/driver/rados/rgw_sal_rados.h b/src/rgw/driver/rados/rgw_sal_rados.h index c8fa876260b..c46ba8e68f0 100644 --- a/src/rgw/driver/rados/rgw_sal_rados.h +++ b/src/rgw/driver/rados/rgw_sal_rados.h @@ -55,8 +55,6 @@ public: virtual int equals(const std::string& other_zonegroup) const override { return group.equals(other_zonegroup); }; - /** Get the endpoint from zonegroup, or from master zone if not set */ - virtual const std::string& get_endpoint() const override; virtual bool placement_target_exists(std::string& target) const override; virtual bool is_master_zonegroup() const override { return group.is_master_zonegroup(); diff --git a/src/rgw/rgw_sal.h b/src/rgw/rgw_sal.h index d449535c398..a4b0219dd41 100644 --- a/src/rgw/rgw_sal.h +++ b/src/rgw/rgw_sal.h @@ -1431,8 +1431,6 @@ public: virtual const std::string& get_name() const = 0; /** Determine if two zonegroups are the same */ virtual int equals(const std::string& other_zonegroup) const = 0; - /** Get the endpoint from zonegroup, or from master zone if not set */ - virtual const std::string& get_endpoint() const = 0; /** Check if a placement target (by name) exists in this zonegroup */ virtual bool placement_target_exists(std::string& target) const = 0; /** Check if this is the master zonegroup */ diff --git a/src/rgw/rgw_sal_dbstore.cc b/src/rgw/rgw_sal_dbstore.cc index c8046a65a00..47fa0f06ba7 100644 --- a/src/rgw/rgw_sal_dbstore.cc +++ b/src/rgw/rgw_sal_dbstore.cc @@ -428,19 +428,6 @@ namespace rgw::sal { dbsm->destroyAllHandles(); } - const std::string& DBZoneGroup::get_endpoint() const { - if (!group->endpoints.empty()) { - return group->endpoints.front(); - } else { - // use zonegroup's master zone endpoints - auto z = group->zones.find(group->master_zone); - if (z != group->zones.end() && !z->second.endpoints.empty()) { - return z->second.endpoints.front(); - } - } - return empty; - } - bool DBZoneGroup::placement_target_exists(std::string& target) const { return !!group->placement_targets.count(target); } diff --git a/src/rgw/rgw_sal_dbstore.h b/src/rgw/rgw_sal_dbstore.h index 83f3ff96578..7ab98f6286b 100644 --- a/src/rgw/rgw_sal_dbstore.h +++ b/src/rgw/rgw_sal_dbstore.h @@ -239,8 +239,6 @@ protected: virtual int equals(const std::string& other_zonegroup) const override { return group->equals(other_zonegroup); }; - /** Get the endpoint from zonegroup, or from master zone if not set */ - virtual const std::string& get_endpoint() const override; virtual bool placement_target_exists(std::string& target) const override; virtual bool is_master_zonegroup() const override { return group->is_master_zonegroup(); diff --git a/src/rgw/rgw_sal_filter.h b/src/rgw/rgw_sal_filter.h index 1711723bdd2..aec8cd64c2c 100644 --- a/src/rgw/rgw_sal_filter.h +++ b/src/rgw/rgw_sal_filter.h @@ -50,8 +50,6 @@ public: { return next->get_name(); } virtual int equals(const std::string& other_zonegroup) const override { return next->equals(other_zonegroup); } - virtual const std::string& get_endpoint() const override - { return next->get_endpoint(); } virtual bool placement_target_exists(std::string& target) const override { return next->placement_target_exists(target); } virtual bool is_master_zonegroup() const override