jolshan commented on code in PR #14489: URL: https://github.com/apache/kafka/pull/14489#discussion_r1406686608
########## core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala: ########## @@ -514,8 +520,14 @@ class TransactionStateManager(brokerId: Int, * When this broker becomes a leader for a transaction log partition, load this partition and populate the transaction * metadata cache with the transactional ids. This operation must be resilient to any partial state left off from * the previous loading / unloading operation. + * + * If the state is already loaded (leader epoch bumps, but we have the same leader), just update the epoch in the + * metadata cache and for all the pending markers. */ - def loadTransactionsForTxnTopicPartition(partitionId: Int, coordinatorEpoch: Int, sendTxnMarkers: SendTxnMarkersCallback): Unit = { + def maybeLoadTransactionsAndBumpEpochForTxnTopicPartition(partitionId: Int, Review Comment: Ok. 😅 I think I was trying to distinguish the difference between logical and physical loading. But maybe that is too specific. Do you think it should just keep the original name? ########## core/src/main/scala/kafka/coordinator/transaction/TransactionStateManager.scala: ########## @@ -514,8 +520,14 @@ class TransactionStateManager(brokerId: Int, * When this broker becomes a leader for a transaction log partition, load this partition and populate the transaction * metadata cache with the transactional ids. This operation must be resilient to any partial state left off from * the previous loading / unloading operation. + * + * If the state is already loaded (leader epoch bumps, but we have the same leader), just update the epoch in the + * metadata cache and for all the pending markers. */ - def loadTransactionsForTxnTopicPartition(partitionId: Int, coordinatorEpoch: Int, sendTxnMarkers: SendTxnMarkersCallback): Unit = { + def maybeLoadTransactionsAndBumpEpochForTxnTopicPartition(partitionId: Int, Review Comment: Ok. 😅 I think I was trying to distinguish the difference between logical and physical loading. But maybe that is too specific. Do you think it should just keep the original name? -- 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