jolshan commented on code in PR #18011:
URL: https://github.com/apache/kafka/pull/18011#discussion_r1868448611
##########
core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala:
##########
@@ -596,10 +596,9 @@ class TransactionStateManager(brokerId: Int,
*/
def removeTransactionsForTxnTopicPartition(partitionId: Int,
coordinatorEpoch: Int): Unit = {
val topicPartition = new
TopicPartition(Topic.TRANSACTION_STATE_TOPIC_NAME, partitionId)
- val partitionAndLeaderEpoch =
TransactionPartitionAndLeaderEpoch(partitionId, coordinatorEpoch)
inWriteLock(stateLock) {
- loadingPartitions.remove(partitionAndLeaderEpoch)
Review Comment:
Yup, basically we would never remove anything here. The impact is that we
keep stale partition state loaded on the broker. This isn't harmful on its own
but can affect memory usage. There was also a task to prevent reloading if a
partition was already loaded on a broker (think re-electing the same leader)
and having this stale state could also complicate that.
https://issues.apache.org/jira/browse/KAFKA-15468
--
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]