OmniaGM commented on code in PR #19964:
URL: https://github.com/apache/kafka/pull/19964#discussion_r2152719515


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java:
##########
@@ -855,7 +860,7 @@ private void sendProduceRequest(long now, int destination, 
short acks, int timeo
         if (batches.isEmpty())
             return;
 
-        final Map<TopicPartition, ProducerBatch> recordsByPartition = new 
HashMap<>(batches.size());
+        final Map<TopicIdPartition, ProducerBatch> recordsByPartition = new 
HashMap<>(batches.size());
         Map<String, Uuid> topicIds = topicIdsForBatches(batches);

Review Comment:
   Actually there is a potential for this in `Sender::topicIdsForBatches` 
default to Uuid zero if metadata doesn't have the topic. Am thinking now that 
maybe `ProducerBatch` should use `TopicIdPartition` instead of `TopicPartition` 



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

Reply via email to