diff --git a/main.cc b/main.cc index 9e11dcab5e..83cb8f9dc5 100644 --- a/main.cc +++ b/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 diff --git a/service/storage_service.cc b/service/storage_service.cc index 52c713c0ad..b7b6d52752 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -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] {