jolshan commented on a change in pull request #9944: URL: https://github.com/apache/kafka/pull/9944#discussion_r595284658
########## File path: core/src/main/scala/kafka/server/KafkaApis.scala ########## @@ -661,11 +661,21 @@ class KafkaApis(val requestChannel: RequestChannel, val versionId = request.header.apiVersion val clientId = request.header.clientId val fetchRequest = request.body[FetchRequest] + val (topicIds, topicNames) = + if (fetchRequest.version() >= 13) + metadataCache.topicIdInfo() + else + (Collections.emptyMap[String, Uuid](), Collections.emptyMap[Uuid, String]()) + val fetchContext = fetchManager.newContext( + fetchRequest.version, fetchRequest.metadata, - fetchRequest.fetchData, - fetchRequest.toForget, - fetchRequest.isFromFollower) + fetchRequest.isFromFollower, + fetchRequest.fetchDataAndError(topicNames), + fetchRequest.toForgetAndIds(topicNames), Review comment: I went to fix this but I realized something. Correct me if I'm wrong. The newest version of Fetch will only return topic IDs (not topic names) so we won't expose topic names. The older version of Fetch sends topic names so it will have to send topic names back. I don't think the name is ever incorrectly exposed. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org