jolshan commented on code in PR #13607: URL: https://github.com/apache/kafka/pull/13607#discussion_r1180864382
########## core/src/main/scala/kafka/server/ReplicaManager.scala: ########## @@ -642,7 +642,14 @@ class ReplicaManager(val config: KafkaConfig, (entriesPerPartition, Map.empty) else entriesPerPartition.partition { case (topicPartition, records) => - getPartitionOrException(topicPartition).hasOngoingTransaction(records.firstBatch().producerId()) + // Produce requests (only requests that require verification) should only have one batch in "batches" but check all just to be safe. + val transactionalBatches = records.batches.asScala.filter(batch => batch.hasProducerId && batch.isTransactional) Review Comment: it would be the other way around, we can have a producer id but not be transactional with idempotent producers. -- 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