Hangleton commented on code in PR #13240: URL: https://github.com/apache/kafka/pull/13240#discussion_r1122096890
########## clients/src/main/java/org/apache/kafka/common/requests/OffsetCommitResponse.java: ########## @@ -149,13 +161,15 @@ public Builder addPartition( return this; } - public <P> Builder addPartitions( - String topicName, - List<P> partitions, - Function<P, Integer> partitionIndex, - Errors error + public final <P> Builder<T> addPartitions( Review Comment: There is still a problem here if `topicName` and `topicId` are both undefined in which case we should do what was done before and add to the response without caching. ########## core/src/main/scala/kafka/server/KafkaApis.scala: ########## @@ -425,35 +426,59 @@ class KafkaApis(val requestChannel: RequestChannel, requestHelper.sendMaybeThrottle(request, offsetCommitRequest.getErrorResponse(Errors.UNSUPPORTED_VERSION.exception)) CompletableFuture.completedFuture[Unit](()) } else { + val topicResolver = TopicResolver.fromTopicIds(metadataCache.topicNamesToIds()) Review Comment: Move the `TopicResolver` in the `MetadataCache` or create it without copying the map of topic ids as this is costly. -- 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