From 1daa8fa3bb4442be69ee11fac8de6889968a429a Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Tue, 5 Sep 2023 11:51:32 +0300 Subject: [PATCH] system_keyspace: Don't cache local dc:rack pair Now no code needs it from system keyspace Signed-off-by: Pavel Emelyanov --- db/system_keyspace.cc | 12 ------------ db/system_keyspace.hh | 1 - 2 files changed, 13 deletions(-) diff --git a/db/system_keyspace.cc b/db/system_keyspace.cc index 988542b85d..eb2ded8278 100644 --- a/db/system_keyspace.cc +++ b/db/system_keyspace.cc @@ -1407,7 +1407,6 @@ future<> system_keyspace::save_local_supported_features(const std::set system_keyspace::initialize_virtual_tables( install_virtual_readers(*this, db); } -locator::endpoint_dc_rack system_keyspace::local_dc_rack() const { - return _cache->_local_dc_rack_info; -} - future>> system_keyspace::query_mutations(distributed& db, const sstring& ks_name, const sstring& cf_name) { schema_ptr schema = db.local().find_schema(ks_name, cf_name); @@ -2793,13 +2788,6 @@ system_keyspace::system_keyspace( , _cache(std::make_unique()) { _db.plug_system_keyspace(*this); - - // FIXME - // This should be coupled with setup_version()'s part committing these values into - // the system.local table. However, cql_test_env needs cached local_dc_rack strings, - // but it doesn't call system_keyspace::setup() and thus ::setup_version() either - _cache->_local_dc_rack_info.dc = snitch->get_datacenter(); - _cache->_local_dc_rack_info.rack = snitch->get_rack(); } system_keyspace::~system_keyspace() { diff --git a/db/system_keyspace.hh b/db/system_keyspace.hh index 316cfa53a6..285205ffc8 100644 --- a/db/system_keyspace.hh +++ b/db/system_keyspace.hh @@ -330,7 +330,6 @@ public: * Return a map of IP addresses containing a map of dc and rack info */ future> load_dc_rack_info(); - locator::endpoint_dc_rack local_dc_rack() const; enum class bootstrap_state { NEEDS_BOOTSTRAP,