You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/27 17:19:43 UTC

[GitHub] [kafka] guozhangwang commented on a change in pull request #11098: KAFKA-13099; Transactional expiration should account for max batch size

guozhangwang commented on a change in pull request #11098:
URL: https://github.com/apache/kafka/pull/11098#discussion_r677649333



##########
File path: core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala
##########
@@ -161,22 +162,26 @@ class TransactionStateManager(brokerId: Int,
             maxBatchSize
           )
 
-          partitionCacheEntry.metadataPerTransactionalId.foreachWhile { (transactionalId, txnMetadata) =>
+          var breakIteration = false

Review comment:
       I think I may miss something here, could you explain why we'd need both the caller/callee doing this while loop with the break iteration flag? It seems to me that we have multiple reasons to break early: 1) we've reached the record limit, 2) the partition is already offline, and we want to treat them differently and hence the both while loops, right?
   
   But I cannot see exactly where we may have case 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