You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Vincent Jiang (Jira)" <ji...@apache.org> on 2024/11/04 22:58:00 UTC
[jira] [Created] (KAFKA-17941) TransactionStateManager.loadTransactionMetadata method may get stuck in an infinite loop
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)