You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "chia7712 (via GitHub)" <gi...@apache.org> on 2026/09/11 02:46:24 UTC

Re: [PR] KAFKA-19003: Add forceTerminateTransaction command to CLI tools [kafka]

chia7712 commented on code in PR #19276:
URL: https://github.com/apache/kafka/pull/19276#discussion_r3985495842


##########
tools/src/main/java/org/apache/kafka/tools/TransactionsCommand.java:
##########
@@ -254,6 +254,42 @@ void execute(Admin admin, Namespace ns, PrintStream out) throws Exception {
         }
     }
 
+    static class ForceTerminateTransactionsCommand extends TransactionsCommand {
+
+        ForceTerminateTransactionsCommand(Time time) {
+            super(time);
+        }
+
+        @Override
+        String name() {
+            return "forceTerminateTransaction";
+        }
+
+        @Override
+        void addSubparser(Subparsers subparsers) {
+            Subparser subparser = subparsers.addParser(name())
+                .description("Force abort an ongoing transaction on transactionalId")
+                .help("Force abort an ongoing transaction on transactionalId (requires administrative privileges)");
+
+            subparser.addArgument("--transactionalId")

Review Comment:
   This seems inconsistent with existing tools, such as `--transactional-id` and `--transactional-id-pattern`. I'm not sure whether it is worth having a new KIP to deprecate `--transactionalId` for consistency ... @jolshan WDYT



-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org