Skip to content

Commit

Permalink
Merge 'Remove unused storage_proxy args from some replica::database m…
Browse files Browse the repository at this point in the history
…ethods' from Pavel Emelyanov

null

Closes #14489

* github.com:scylladb/scylladb:
  database: Remove unused proxy arg from update_keyspace_on_all_shards()
  database: Remove unused proxy arg from update_keyspace()
  • Loading branch information
nyh committed Jul 3, 2023
2 parents 520bd90 + 0d4c981 commit 94bf6bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion db/schema_tables.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1370,7 +1370,7 @@ future<std::set<sstring>> merge_keyspaces(distributed<service::storage_proxy>& p
auto v = co_await db::schema_tables::read_schema_partition_for_keyspace(proxy, db::schema_tables::KEYSPACES, name);
auto scylla_specific_rs = co_await db::schema_tables::extract_scylla_specific_keyspace_info(proxy, v);
auto tmp_ksm = db::schema_tables::create_keyspace_from_schema_partition(v, scylla_specific_rs);
co_await replica::database::update_keyspace_on_all_shards(sharded_db, proxy, *tmp_ksm);
co_await replica::database::update_keyspace_on_all_shards(sharded_db, *tmp_ksm);
}
co_return dropped;
}
Expand Down
6 changes: 3 additions & 3 deletions replica/database.cc
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ future<> database::modify_keyspace_on_all_shards(sharded<database>& sharded_db,
co_await sharded_db.invoke_on_all(notifier);
}

future<> database::update_keyspace(sharded<service::storage_proxy>& proxy, const keyspace_metadata& tmp_ksm) {
future<> database::update_keyspace(const keyspace_metadata& tmp_ksm) {
auto& ks = find_keyspace(tmp_ksm.name());
auto new_ksm = ::make_lw_shared<keyspace_metadata>(tmp_ksm.name(), tmp_ksm.strategy_name(), tmp_ksm.strategy_options(), tmp_ksm.durable_writes(),
boost::copy_range<std::vector<schema_ptr>>(ks.metadata()->cf_meta_data() | boost::adaptors::map_values), std::move(ks.metadata()->user_types()));
Expand All @@ -905,9 +905,9 @@ future<> database::update_keyspace(sharded<service::storage_proxy>& proxy, const
co_await ks.update_from(get_shared_token_metadata(), std::move(new_ksm));
}

future<> database::update_keyspace_on_all_shards(sharded<database>& sharded_db, sharded<service::storage_proxy>& proxy, const keyspace_metadata& ksm) {
future<> database::update_keyspace_on_all_shards(sharded<database>& sharded_db, const keyspace_metadata& ksm) {
return modify_keyspace_on_all_shards(sharded_db, [&] (replica::database& db) {
return db.update_keyspace(proxy, ksm);
return db.update_keyspace(ksm);
}, [&] (replica::database& db) {
const auto& ks = db.find_keyspace(ksm.name());
return db.get_notifier().update_keyspace(ks.metadata());
Expand Down
4 changes: 2 additions & 2 deletions replica/database.hh
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ private:
future<> create_keyspace(const lw_shared_ptr<keyspace_metadata>&, locator::effective_replication_map_factory& erm_factory, system_keyspace system);
void remove(table&) noexcept;
void drop_keyspace(const sstring& name);
future<> update_keyspace(sharded<service::storage_proxy>& proxy, const keyspace_metadata& tmp_ksm);
future<> update_keyspace(const keyspace_metadata& tmp_ksm);
static future<> modify_keyspace_on_all_shards(sharded<database>& sharded_db, std::function<future<>(replica::database&)> func, std::function<future<>(replica::database&)> notifier);
public:
static table_schema_version empty_version;
Expand Down Expand Up @@ -1538,7 +1538,7 @@ public:
bool has_keyspace(std::string_view name) const;
void validate_keyspace_update(keyspace_metadata& ksm);
void validate_new_keyspace(keyspace_metadata& ksm);
static future<> update_keyspace_on_all_shards(sharded<database>& sharded_db, sharded<service::storage_proxy>& proxy, const keyspace_metadata& ksm);
static future<> update_keyspace_on_all_shards(sharded<database>& sharded_db, const keyspace_metadata& ksm);
static future<> drop_keyspace_on_all_shards(sharded<database>& sharded_db, const sstring& name);
std::vector<sstring> get_non_system_keyspaces() const;
std::vector<sstring> get_user_keyspaces() const;
Expand Down

0 comments on commit 94bf6bb

Please sign in to comment.