Vincent Jiang created KAFKA-17941: ------------------------------------- Summary: TransactionStateManager.loadTransactionMetadata method may get stuck in an infinite loop Key: KAFKA-17941 URL: https://issues.apache.org/jira/browse/KAFKA-17941 Project: Kafka Issue Type: Bug Reporter: Vincent Jiang
When loading transaction metadata from a transaction log partition, if the partition contains a segment ending with an empty batch, "currOffset" update logic at [https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala#L482] will be skipped. Since "currOffset" is not advanced to next offset of last batch properly, TransactionStateManager.loadTransactionMetadata method will be stuck in the "while" loop at [https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala#L438.|https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala#L438,] -- This message was sent by Atlassian Jira (v8.20.10#820010)