junrao commented on code in PR #23203:
URL: https://github.com/apache/kafka/pull/23203#discussion_r4096982756


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java:
##########
@@ -320,7 +320,8 @@ public RecordAppendResult append(String topic,
                 setPartition(callbacks, effectivePartition);
 
                 // check if we have an in-progress batch
-                Deque<ProducerBatch> dq = 
topicInfo.batches.computeIfAbsent(effectivePartition, k -> new ArrayDeque<>());
+                TopicPartition tp = new TopicPartition(topic, 
effectivePartition);

Review Comment:
   It used to be that a TopicPartition is created once per batch. With this 
change, it's created for every record append. Could you do some perf test to 
make sure that the overall producer send performance doesn't degrade with this 
change? The included perf test only covers the ready() call.



-- 
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]

Reply via email to