Skip to content

Remove dead JSONRPC server_shutdown handler - #13578

Open
masaori335 wants to merge 1 commit into
apache:masterfrom
masaori335:asf-master-shutdown-rpc
Open

Remove dead JSONRPC server_shutdown handler#13578
masaori335 wants to merge 1 commit into
apache:masterfrom
masaori335:asf-master-shutdown-rpc

Conversation

@masaori335

Copy link
Copy Markdown
Contributor

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.

Never registered nor called since it was added in apache#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.
@masaori335 masaori335 added this to the 11.0.0 milestone Aug 21, 2026
@masaori335 masaori335 self-assigned this Aug 21, 2026
Copilot AI lite review requested due to automatic review settings August 21, 2026 01:44
@masaori335 masaori335 added the JSONRPC JSONRPC 2.0 related work. label Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes an unused JSONRPC handler (server_shutdown) from the management RPC server handlers, avoiding an unregistered/mismatched handler signature and eliminating an unnecessary dependency on iocore cache internals from mgmt.

Changes:

  • Removed the dead server_shutdown handler implementation and its declaration.
  • Dropped the mgmt-side include of P_CacheDir.h that was only used by the removed handler.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/mgmt/rpc/handlers/server/Server.cc Removes the unused shutdown handler and the private cache header include.
include/mgmt/rpc/handlers/server/Server.h Removes the corresponding handler declaration from the public header.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Cleanup JSONRPC JSONRPC 2.0 related work.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants