Hangleton commented on code in PR #13240:
URL: https://github.com/apache/kafka/pull/13240#discussion_r1122188628


##########
clients/src/main/java/org/apache/kafka/common/requests/OffsetCommitResponse.java:
##########
@@ -166,20 +187,27 @@ public <P> Builder addPartitions(
             return this;
         }
 
-        public Builder merge(
-            OffsetCommitResponseData newData
-        ) {
+        public Builder<T> merge(OffsetCommitResponseData newData) {
+            if (version >= 9) {
+                // This method is called after the group coordinator committed 
the offsets. The group coordinator
+                // provides the OffsetCommitResponseData it built in the 
process. As of now, this data does
+                // not contain topic ids, so we resolve them here.
+                newData.topics().forEach(
+                        topic -> 
topic.setTopicId(topicResolver.getTopicId(topic.name()).orElse(Uuid.ZERO_UUID)));

Review Comment:
   At this point, topic ids should be always resolvable. However if some 
aren't, we should fallback to adding the topic "as is" to the response to avoid 
caching `ZERO_UUID` with risk of overwrites.



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