database: remove add_keyspace() function
It is not longer used. Message-Id: <20210209175931.1796263-2-gleb@scylladb.com>
This commit is contained in:
committed by
Tomasz Grabiec
parent
54785604b4
commit
d06d21bfae
@@ -886,12 +886,6 @@ database::shard_of(const frozen_mutation& m) {
|
||||
return dht::shard_of(*schema, dht::get_token(*schema, m.key()));
|
||||
}
|
||||
|
||||
void database::add_keyspace(sstring name, keyspace k) {
|
||||
if (auto [ignored, added] = _keyspaces.try_emplace(std::move(name), std::move(k)); !added) {
|
||||
throw std::invalid_argument("Keyspace " + name + " already exists");
|
||||
}
|
||||
}
|
||||
|
||||
future<> database::update_keyspace(sharded<service::storage_proxy>& proxy, const sstring& name) {
|
||||
return db::schema_tables::read_schema_partition_for_keyspace(proxy, db::schema_tables::KEYSPACES, name).then([this, name](db::schema_tables::schema_result_value_type&& v) {
|
||||
auto& ks = find_keyspace(name);
|
||||
|
||||
@@ -1318,9 +1318,6 @@ public:
|
||||
void set_local_id(utils::UUID uuid) noexcept { _local_host_id = std::move(uuid); }
|
||||
|
||||
private:
|
||||
// Unless you are an earlier boostraper or the database itself, you should
|
||||
// not be using this directly. Go for the public create_keyspace instead.
|
||||
void add_keyspace(sstring name, keyspace k);
|
||||
using system_keyspace = bool_class<struct system_keyspace_tag>;
|
||||
void create_in_memory_keyspace(const lw_shared_ptr<keyspace_metadata>& ksm, system_keyspace system);
|
||||
friend future<> db::system_keyspace::make(database& db);
|
||||
|
||||
Reference in New Issue
Block a user