[
https://issues.apache.org/jira/browse/KAFKA-17941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justine Olshan reassigned KAFKA-17941:
--------------------------------------
Assignee: Vincent Jiang
> 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
> Assignee: Vincent Jiang
> Priority: Major
>
> 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)