system_keyspace: De-static save_local_supported_features()

That's, in fact, an independent change, because feature enabler doesn't
need this method. So this patch is like "while at it" thing, but on the
other hand it ditches one more qctx usage.

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2023-04-25 16:02:16 +03:00
parent a5bd6cc832
commit 5cbc8fe2f9
3 changed files with 3 additions and 3 deletions

View File

@@ -1391,7 +1391,7 @@ future<> system_keyspace::setup_version(sharded<netw::messaging_service>& ms) {
future<> system_keyspace::save_local_supported_features(const std::set<std::string_view>& feats) {
static const auto req = format("INSERT INTO system.{} (key, supported_features) VALUES (?, ?)", LOCAL);
return qctx->execute_cql(req,
return execute_cql(req,
sstring(db::system_keyspace::LOCAL),
fmt::to_string(fmt::join(feats, ","))).discard_result();
}

View File

@@ -442,7 +442,7 @@ public:
static future<> set_raft_group0_id(utils::UUID id);
// Save advertised gossip feature set to system.local
static future<> save_local_supported_features(const std::set<std::string_view>& feats);
future<> save_local_supported_features(const std::set<std::string_view>& feats);
// Get the last (the greatest in timeuuid order) state ID in the group 0 history table.
// Assumes that the history table exists, i.e. Raft experimental feature is enabled.

View File

@@ -1328,7 +1328,7 @@ future<> storage_service::join_token_ring(cdc::generation_service& cdc_gen_servi
// Save the advertised feature set to system.local table after
// all remote feature checks are complete and after gossip shadow rounds are done.
// At this point, the final feature set is already determined before the node joins the ring.
co_await db::system_keyspace::save_local_supported_features(features);
co_await _sys_ks.local().save_local_supported_features(features);
// If this is a restarting node, we should update tokens before gossip starts
auto my_tokens = co_await _sys_ks.local().get_saved_tokens();