masaori335 commented on code in PR #13328:
URL: https://github.com/apache/trafficserver/pull/13328#discussion_r3708169661


##########
src/traffic_ctl/traffic_ctl.cc:
##########
@@ -315,6 +317,20 @@ main([[maybe_unused]] int argc, const char **argv)
     .add_option("--params", "-p", "Parameters to be passed in the request, 
YAML or JSON format", "", MORE_THAN_ONE_ARG_N, "", "")
     .add_example_usage("traffic_ctl rpc invoke foo_bar -p \"numbers: [1, 2, 
3]\"");
 
+  // cache shm commands - operate directly on POSIX shared memory; no running 
server required.
+  auto &shm_command = cache_command.add_command("shm", "Inspect and manage 
cache shared-memory segments").require_commands();
+  // No parser-level default for --prefix: ArgParser injects defaults into the 
parsed
+  // arguments, which would make an omitted --prefix indistinguishable from an 
explicit
+  // one. CacheShmCommand supplies the runtime default and keys its "did you 
set
+  // name_prefix?" hint off the option being absent.
+  shm_command.add_option("--prefix", "-p", "shm name prefix word, framed as 
/<word>- (default 'ats')", "", 1, "");
+  shm_command.add_command("status", "Show the cache shared-memory control 
segment and stripe table", [&]() { command->execute(); })
+    .add_example_usage("traffic_ctl cache shm status")
+    .add_example_usage("traffic_ctl cache shm status --prefix ats-t");
+  shm_command.add_command("clear", "Unlink the cache shared-memory control and 
stripe segments", [&]() { command->execute(); })
+    .add_example_usage("traffic_ctl cache shm clear")
+    .add_example_usage("traffic_ctl cache shm clear --prefix ats-t");

Review Comment:
   Fixed by 
[55d5019](https://github.com/apache/trafficserver/pull/13328/commits/55d501947a886d1ba74e184982c9415aaef63481)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to