hachikuji commented on a change in pull request #11098: URL: https://github.com/apache/kafka/pull/11098#discussion_r677847584
########## 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 tried to consolidate this logic into a single loop, which I think is what you are suggesting. Let me know if the latest commit is what you had in mind. -- 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-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org