You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "CalvinConfluent (via GitHub)" <gi...@apache.org> on 2025/09/12 16:12:04 UTC

[PR] Fix TransactionStateManager handling of empty batch when loading transaction metadata (#17688) [kafka]

CalvinConfluent opened a new pull request, #20529:
URL: https://github.com/apache/kafka/pull/20529

   When loading transaction metadata from a transaction log partition, if the partition contains a segment ending with an empty batch, "currOffset" update logic at will be skipped for the last batch. Since "currOffset" is not advanced to next offset of last batch properly, TransactionStateManager.loadTransactionMetadata method will be stuck in the "while" loop.
   
   This change fixes the issue by updating "currOffset" after processing each batch, whether the batch is empty or not.
   
   Reviewers: Justine Olshan <jo...@confluent.io>, Jun Rao <ju...@gmail.com>
   


-- 
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] Fix TransactionStateManager handling of empty batch when loading transaction metadata (#17688) [kafka]

Posted by "jolshan (via GitHub)" <gi...@apache.org>.
jolshan commented on PR #20529:
URL: https://github.com/apache/kafka/pull/20529#issuecomment-3286512304

   Can we include the jira in the pr title?


-- 
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-17941: Fix TransactionStateManager handling of empty batch when loading transaction metadata (#17688) [kafka]

Posted by "jolshan (via GitHub)" <gi...@apache.org>.
jolshan merged PR #20529:
URL: https://github.com/apache/kafka/pull/20529


-- 
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] Fix TransactionStateManager handling of empty batch when loading transaction metadata (#17688) [kafka]

Posted by "jolshan (via GitHub)" <gi...@apache.org>.
jolshan commented on PR #20529:
URL: https://github.com/apache/kafka/pull/20529#issuecomment-3286514101

   We also need to remove 4.0 specific code:
   
   ```
   [Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-20529/core/src/test/scala/unit/kafka/coordinator/transaction/TransactionStateManagerTest.scala:963:122: not found: value TV_2
   --
     |   |   | [Error] /home/jenkins/jenkins-agent/workspace/Kafka_kafka-pr_PR-20529/core/src/test/scala/unit/kafka/coordinator/transaction/TransactionStateManagerTest.scala:975:122: not found: value TV_2
   ```
   


-- 
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