You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "junrao (via GitHub)" <gi...@apache.org> on 2026/09/24 18:20:36 UTC
Re: [PR] KAFKA-20917: Reduce per-partition and per-batch overhead in RecordAccumulator.ready() [kafka]
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: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org