You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mohammad Suhel Ksolves Cassandra Experties (Jira)" <ji...@apache.org> on 2025/08/11 05:38:00 UTC
[jira] [Commented] (CASSANDRA-20793) Improve compact nodetool command to comply with standards by splitting into separate subcommands
[ https://issues.apache.org/jira/browse/CASSANDRA-20793?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18013155#comment-18013155 ]
Mohammad Suhel Ksolves Cassandra Experties commented on CASSANDRA-20793:
------------------------------------------------------------------------
Hi [~mmuzaf], For the {{@Deprecated(since = "...")}} annotation in {{{}Compact.java{}}}, which release version should we specify? Should this be marked as deprecated starting from 5.0 or any next minor release?
> Improve compact nodetool command to comply with standards by splitting into separate subcommands
> ------------------------------------------------------------------------------------------------
>
> Key: CASSANDRA-20793
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20793
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Tool/nodetool
> Reporter: Maxim Muzafarov
> Assignee: Mohammad Suhel Ksolves Cassandra Experties
> Priority: Normal
>
> The current compact command violates picocli best practices by mixing different types of arguments in a single command. The command currently accepts three distinct types of input:
> # Keyspace/Table compaction: [<keyspace> <tables>...] - for forcing major compaction on specific keyspaces and tables
> # SSTable file compaction: <SSTable file>... - for user-defined compaction on specific SSTable files
> # Token range compaction: Using --start-token and --end-token options for token-based compaction
> Problems with current implementation:
> * The command handles three completely different compaction scenarios
> * Users must understand complex conditional logic to determine which mode to use
> * Other nodetool commands use clear subcommands for different operations
> * The execute() method contains complex conditional checks that should be handled by picocli's argument validation
> * The usage description "[<keyspace> <tables>...] or <SSTable file>..." is confusing
> h3. Proposed Solution
> Split the compact command into three separate subcommands under a main compact command:
> # compact keyspace - For keyspace/table compaction
> # compact sstables - For user-defined SSTable compaction
> # compact range - For token range compaction
> All the changes must be backward compatible, this mean the compact command must be deprecated first.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org