artemlivshits commented on code in PR #18011:
URL: https://github.com/apache/kafka/pull/18011#discussion_r1866757934
##########
core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala:
##########
@@ -610,6 +609,17 @@ class TransactionStateManager(brokerId: Int,
}
}
+ /**
+ * Remove the loading partition if the epoch is less than the specified
epoch. Note: This method must be called under the write state lock.
+ */
+ private def removeLoadingPartitionWithEpoch(partitionId: Int,
coordinatorEpoch: Int): Unit = {
+ loadingPartitions.find(_.txnPartitionId == partitionId).foreach {
partitionAndLeaderEpoch =>
+ if (partitionAndLeaderEpoch.coordinatorEpoch < coordinatorEpoch) {
+ loadingPartitions.remove(partitionAndLeaderEpoch)
Review Comment:
I think this should be pretty rare, so we could add an info level logging.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]