dajac commented on code in PR #15176:
URL: https://github.com/apache/kafka/pull/15176#discussion_r1470109481
##########
core/src/main/scala/kafka/server/ReplicaManager.scala:
##########
@@ -813,19 +816,19 @@ class ReplicaManager(val config: KafkaConfig,
val transactionalProducerInfo = mutable.HashSet[(Long, Short)]()
val topicPartitionBatchInfo = mutable.Map[TopicPartition, Int]()
- entriesPerPartition.foreach { case (topicPartition, records) =>
+ entriesPerPartition.forKeyValue { (topicPartition, records) =>
// Produce requests (only requests that require verification) should
only have one batch per partition in "batches" but check all just to be safe.
val transactionalBatches = records.batches.asScala.filter(batch =>
batch.hasProducerId && batch.isTransactional)
transactionalBatches.foreach(batch =>
transactionalProducerInfo.add(batch.producerId, batch.producerEpoch))
- if (!transactionalBatches.isEmpty)
topicPartitionBatchInfo.put(topicPartition, records.firstBatch.baseSequence)
+ if (transactionalBatches.nonEmpty)
topicPartitionBatchInfo.put(topicPartition, records.firstBatch.baseSequence)
}
if (transactionalProducerInfo.size > 1) {
throw new InvalidPidMappingException("Transactional records contained
more than one producer ID")
}
- def postVerificationCallback(preAppendErrors: Map[TopicPartition, Errors],
- newRequestLocal: RequestLocal,
- verificationGuards: Map[TopicPartition,
VerificationGuard]): Unit = {
+ def postVerificationCallback(newRequestLocal: RequestLocal,
+ results: (Map[TopicPartition, Errors],
Map[TopicPartition, VerificationGuard])): Unit = {
Review Comment:
The function that wraps the callback only support wrapping methods with one
argument.
--
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]