From 0941098b3924aec4e15e917aebdbe3bb19ff083b Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 2 Mar 2022 14:47:52 +0300 Subject: [PATCH] storage_service: Remove _ms_stopped This boolean protects do_stop_ms from re-entrability. However, this method is only called from stop_transport() which handles re-entring itself, so the _ms_stopped can be just removed. Signed-off-by: Pavel Emelyanov --- service/storage_service.cc | 4 ---- service/storage_service.hh | 1 - 2 files changed, 5 deletions(-) diff --git a/service/storage_service.cc b/service/storage_service.cc index d2f8ea8b3a..7a99089e86 100644 --- a/service/storage_service.cc +++ b/service/storage_service.cc @@ -1781,10 +1781,6 @@ future<> storage_service::stop_gossiping() { } future<> storage_service::do_stop_ms() { - if (_ms_stopped) { - return make_ready_future<>(); - } - _ms_stopped = true; return _messaging.invoke_on_all([] (auto& ms) { return ms.shutdown(); }).then([] { diff --git a/service/storage_service.hh b/service/storage_service.hh index 14a3a22b76..2bef9801fc 100644 --- a/service/storage_service.hh +++ b/service/storage_service.hh @@ -152,7 +152,6 @@ private: sharded& _repair; sharded& _stream_manager; sstring _operation_in_progress; - bool _ms_stopped = false; seastar::metrics::metric_groups _metrics; using client_shutdown_hook = noncopyable_function; std::vector _protocol_servers;