jolshan commented on code in PR #18604:
URL: https://github.com/apache/kafka/pull/18604#discussion_r1925843856
##########
core/src/main/scala/kafka/log/UnifiedLog.scala:
##########
@@ -600,6 +600,11 @@ class UnifiedLog(@volatile var logStartOffset: Long,
*/
def hasOngoingTransaction(producerId: Long, producerEpoch: Short): Boolean =
lock synchronized {
val entry = producerStateManager.activeProducers.get(producerId)
+ // With transactions V2, if we see a future epoch, we are likely in the
process of completing the previous transaction.
Review Comment:
Ah right. This in theory could be handled still, but with the current code,
if the transaction completes while adding the partition we hit the race
condition. As the code is now, we don't want to handle this case.
--
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]