jolshan commented on code in PR #15968:
URL: https://github.com/apache/kafka/pull/15968#discussion_r1636902182


##########
clients/src/main/java/org/apache/kafka/clients/producer/internals/Sender.java:
##########
@@ -610,7 +611,9 @@ private void handleProduceResponse(ClientResponse response, 
Map<TopicPartition,
                 // This will be set by completeBatch.
                 Map<TopicPartition, Metadata.LeaderIdAndEpoch> 
partitionsWithUpdatedLeaderInfo = new HashMap<>();
                 produceResponse.data().responses().forEach(r -> 
r.partitionResponses().forEach(p -> {
-                    TopicPartition tp = new TopicPartition(r.name(), 
p.index());
+                    // Version 12 drop topic name and add support to topic id. 
However, metadata can be used to map topic id to topic name.
+                    String topicName = (r.name() == null || 
r.name().isEmpty()) ? metadata.topicNames().get(r.topicId()) : r.name();

Review Comment:
   No problem. I've also been super busy so not sure if I would have had time 
to review. 
   
   As long as the tests are between an older version and a newer version (ie 
not upgrade tests where the issue can just seem transient) then this should be 
ok. 
   
   Whenever I implemented the fetch change, I also did some sanity checks by 
looking at the logs when upgrading to see the change in request version without 
errors. I'd recommend doing this at least once as a manual test. 
   
   Thanks for the change and I will take a look. 



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