Arvind Kandpal created CASSANDRA-21816:
------------------------------------------
Summary: nodetool profile start rejects a comma-separated list of
events
Key: CASSANDRA-21816
URL: https://issues.apache.org/jira/browse/CASSANDRA-21816
Project: Apache Cassandra
Issue Type: Bug
Components: Tool/nodetool
Reporter: Arvind Kandpal
Assignee: Arvind Kandpal
The help for nodetool profile start -e says events are "delimited by comma",
but a comma-separated list is rejected:
{noformat}
$ nodetool profile start -e cpu,alloc -f jfr
nodetool: Invalid value for option '--event' (<event>): expected one of [cpu,
alloc, lock, wall, nativemem, cache_misses] (case-sensitive) but was 'cpu,alloc'
{noformat}
Only the repeated form -e cpu -e alloc works today.
Cause: the -e/--event option in AsyncProfileCommandGroup is a list without
split = ",", so picocli tries to convert the whole string "cpu,alloc" into one
value. The server side already accepts a comma-separated list.
Fix: add split = "," to the option, so both -e cpu,alloc and -e cpu -e alloc
work. The default help output is unchanged. A new unit test covers both forms.
Multiple events still need JFR output (-f jfr), as before.
Found while working on CASSANDRA-21732.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]