mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
system_distributed_keyspace: Stop it in main.cc
It's now stopped in drain_on_shutdown, but since its stop() method is a noop, it doesn't matter where it is. Keeping it in main.cc next to related start brings drain_on_shutdown() closer to drain() and the whole thing closer to the Ideal start-stop sequence. Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>
This commit is contained in:
3
main.cc
3
main.cc
@@ -1137,6 +1137,9 @@ int main(int ac, char** av) {
|
||||
});
|
||||
|
||||
sys_dist_ks.start(std::ref(qp), std::ref(mm), std::ref(proxy)).get();
|
||||
auto stop_sdks = defer_verbose_shutdown("system distributed keyspace", [] {
|
||||
sys_dist_ks.invoke_on_all(&db::system_distributed_keyspace::stop).get();
|
||||
});
|
||||
|
||||
// Register storage_service to migration_notifier so we can update
|
||||
// pending ranges when keyspace is chagned
|
||||
|
||||
@@ -1334,9 +1334,6 @@ future<> storage_service::drain_on_shutdown() {
|
||||
tracing::tracing::tracing_instance().stop().get();
|
||||
slogger.info("Drain on shutdown: tracing is stopped");
|
||||
|
||||
ss._sys_dist_ks.invoke_on_all(&db::system_distributed_keyspace::stop).get();
|
||||
slogger.info("Drain on shutdown: system distributed keyspace stopped");
|
||||
|
||||
get_storage_proxy().invoke_on_all([] (storage_proxy& local_proxy) mutable {
|
||||
auto& ss = service::get_local_storage_service();
|
||||
return ss.unregister_subscriber(&local_proxy).finally([&local_proxy] {
|
||||
|
||||
Reference in New Issue
Block a user