system_keyspace: Don't require snitch argument on start

Now system keyspace is finally independent from snitch

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
Pavel Emelyanov
2023-09-05 11:53:40 +03:00
parent 1daa8fa3bb
commit 5d52a35e05
4 changed files with 4 additions and 5 deletions

View File

@@ -2782,7 +2782,7 @@ sstring system_keyspace_name() {
}
system_keyspace::system_keyspace(
cql3::query_processor& qp, replica::database& db, const locator::snitch_ptr& snitch) noexcept
cql3::query_processor& qp, replica::database& db) noexcept
: _qp(qp)
, _db(db)
, _cache(std::make_unique<local_cache>())

View File

@@ -62,7 +62,6 @@ namespace gms {
namespace locator {
class effective_replication_map_factory;
class endpoint_dc_rack;
class snitch_ptr;
} // namespace locator
namespace gms {
@@ -512,7 +511,7 @@ private:
public:
system_keyspace(cql3::query_processor& qp, replica::database& db, const locator::snitch_ptr&) noexcept;
system_keyspace(cql3::query_processor& qp, replica::database& db) noexcept;
~system_keyspace();
future<> shutdown();

View File

@@ -1089,7 +1089,7 @@ To start the scylla server proper, simply invoke as: scylla server (or just scyl
static sharded<cdc::generation_service> cdc_generation_service;
supervisor::notify("starting system keyspace");
sys_ks.start(std::ref(qp), std::ref(db), std::ref(snitch)).get();
sys_ks.start(std::ref(qp), std::ref(db)).get();
// TODO: stop()?
// Initialization of a keyspace is done by shard 0 only. For system

View File

@@ -613,7 +613,7 @@ private:
auto stop_sl_controller = defer([this] { _sl_controller.stop().get(); });
_sl_controller.invoke_on_all(&qos::service_level_controller::start).get();
_sys_ks.start(std::ref(_qp), std::ref(_db), std::ref(_snitch)).get();
_sys_ks.start(std::ref(_qp), std::ref(_db)).get();
auto stop_sys_kd = defer([this] { _sys_ks.stop().get(); });
for (const auto p: all_system_table_load_phases) {
replica::distributed_loader::init_system_keyspace(_sys_ks, _erm_factory, _db, *cfg, p).get();