You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "rreddy-22 (via GitHub)" <gi...@apache.org> on 2025/03/24 20:33:12 UTC
[PR] KAFKA-19003-Add forceTerminateTransaction command to CLI tools [kafka]
rreddy-22 opened a new pull request, #19276:
URL: https://github.com/apache/kafka/pull/19276
The forceTerminateTransaction method would operate on a well-formed but long-running transaction for a given transactional ID. Under the covers, it would just use the InitProducerId call with keepPreparedTxn=false.
--
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
Re: [PR] KAFKA-19003: Add forceTerminateTransaction command to CLI tools [kafka]
Posted by "jolshan (via GitHub)" <gi...@apache.org>.
jolshan merged PR #19276:
URL: https://github.com/apache/kafka/pull/19276
--
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
Re: [PR] KAFKA-19003: Add forceTerminateTransaction command to CLI tools [kafka]
Posted by "jolshan (via GitHub)" <gi...@apache.org>.
jolshan commented on code in PR #19276:
URL: https://github.com/apache/kafka/pull/19276#discussion_r3991462193
##########
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:
We are still in the process of working on KIP-939 so in theory we could add it to the KIP. 😅
But we can also do a new KIP if we want.
--
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
Re: [PR] KAFKA-19003: Add forceTerminateTransaction command to CLI tools [kafka]
Posted by "chia7712 (via GitHub)" <gi...@apache.org>.
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