From 4c3c597a59c36760f77fb204ba9e54e073b598e8 Mon Sep 17 00:00:00 2001 From: Masaori Koshiba Date: Fri, 21 Aug 2026 10:42:31 +0900 Subject: [PATCH] Remove dead JSONRPC server_shutdown handler Never registered nor called since it was added in #7478, and its void(YAML::Node) signature never matched the method handler shape it sat among. Shutdown already syncs the cache dir from the event thread in traffic_server.cc; doing it from an RPC thread would race the dir writers. Dropping it also removes mgmt's relative-path include of iocore's private P_CacheDir.h. --- include/mgmt/rpc/handlers/server/Server.h | 1 - src/mgmt/rpc/handlers/server/Server.cc | 7 ------- 2 files changed, 8 deletions(-) diff --git a/include/mgmt/rpc/handlers/server/Server.h b/include/mgmt/rpc/handlers/server/Server.h index fec31c66bfe..40e9b2ca059 100644 --- a/include/mgmt/rpc/handlers/server/Server.h +++ b/include/mgmt/rpc/handlers/server/Server.h @@ -26,7 +26,6 @@ namespace rpc::handlers::server { swoc::Rv server_start_drain(std::string_view const &id, YAML::Node const ¶ms); swoc::Rv server_stop_drain(std::string_view const &id, YAML::Node const &); -void server_shutdown(YAML::Node const &); swoc::Rv get_server_status(std::string_view const &id, YAML::Node const &); swoc::Rv get_connection_tracker_info(std::string_view const &id, YAML::Node const ¶ms); diff --git a/src/mgmt/rpc/handlers/server/Server.cc b/src/mgmt/rpc/handlers/server/Server.cc index f429d0787cc..c5e440d4b54 100644 --- a/src/mgmt/rpc/handlers/server/Server.cc +++ b/src/mgmt/rpc/handlers/server/Server.cc @@ -18,7 +18,6 @@ limitations under the License. */ -#include "../../../../iocore/cache/P_CacheDir.h" #include "iocore/eventsystem/EventProcessor.h" #include "iocore/net/ConnectionTracker.h" #include "mgmt/rpc/handlers/server/Server.h" @@ -176,12 +175,6 @@ server_stop_drain(std::string_view const & /* id ATS_UNUSED */, YAML::Node const return resp; } -void -server_shutdown(YAML::Node const &) -{ - sync_cache_dir_on_shutdown(); -} - swoc::Rv get_server_status(std::string_view const & /* params ATS_UNUSED */, YAML::Node const & /* params ATS_UNUSED */) {