ShivsundarR commented on code in PR #17537:
URL: https://github.com/apache/kafka/pull/17537#discussion_r1815383443


##########
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareConsumeRequestManager.java:
##########
@@ -594,7 +635,7 @@ private void handleShareFetchSuccess(Node fetchTarget,
                     topicResponse.partitions().forEach(partition ->
                             responseData.put(new 
TopicIdPartition(topicResponse.topicId(),
                                     partition.partitionIndex(),
-                                    
metadata.topicNames().get(topicResponse.topicId())), partition)));
+                                    
metadata.topicNames().getOrDefault(topicResponse.topicId(), 
forgottenTopicNames.remove(topicResponse.topicId()))), partition)));

Review Comment:
   Right, thanks for catching this. I have now used `partitionIndex` along with 
`topicId` as the key for the map to ensure we have removed only the entry 
corresponding to that partition.



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