[ https://issues.apache.org/jira/browse/KAFKA-19003?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ritika Reddy resolved KAFKA-19003. ---------------------------------- Resolution: Fixed > Add force-terminate feature to kafka-transactions CLI and Admin Client > ----------------------------------------------------------------------- > > Key: KAFKA-19003 > URL: https://issues.apache.org/jira/browse/KAFKA-19003 > Project: Kafka > Issue Type: Sub-task > Reporter: Ritika Reddy > Assignee: Ritika Reddy > Priority: Major > > The {{kafka-transactions.sh}} tool is going to support a new command > forceTerminateTransaction. It has one required argument {{-transactionalId}} > that would take the transactional id for the transaction to be terminated. > The {{Admin}} interface will support a new method: > {{public TerminateTransactionResult forceTerminateTransaction(String > transactionalId)}} > {{TerminateTransactionResult}} just contains {{KafkaFuture<void> result}} > method. > NOTE that there is an existing {{abortTransaction}} method that is used to > abort “hanging” transactions (artifact of some gaps in the transaction > protocol implementation that will be addressed in > [KIP-890|https://cwiki.apache.org/confluence/display/KAFKA/KIP-890%3A+Transactions+Server-Side+Defense], > i.e. once part 1 of > [KIP-890|https://cwiki.apache.org/confluence/display/KAFKA/KIP-890%3A+Transactions+Server-Side+Defense] > is implemented we won’t have “hanging” transactions). “Hanging” > transactions are not known to the Kafka transaction coordinator, they are > just dangling messages in data partitions that cannot be aborted via the > normal transaction protocol. So {{abortTransaction}} actually needs > information about data partitions so that it could go and insert markers > directly there. > On the other hand, 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 {{InitProducerId}} call with > {{{}keepPreparedTxn=false{}}}. -- This message was sent by Atlassian Jira (v8.20.10#820010)