dajac commented on code in PR #13240: URL: https://github.com/apache/kafka/pull/13240#discussion_r1121496085
########## clients/src/main/java/org/apache/kafka/common/requests/OffsetCommitRequest.java: ########## @@ -101,18 +103,18 @@ public static List<OffsetCommitResponseTopic> getErrorResponseTopics( .setPartitionIndex(requestPartition.partitionIndex()) .setErrorCode(e.code())); } - responseTopicData.add(new OffsetCommitResponseTopic() - .setName(entry.name()) - .setPartitions(responsePartitions) - ); + OffsetCommitResponseTopic responseTopic = new OffsetCommitResponseTopic() + .setTopicId(version >= 9 ? entry.topicId() : Uuid.ZERO_UUID) + .setName(version < 9 ? entry.name() : null); Review Comment: I think that we could just set both the name and the id all the time as the fields are ignorable. The serialization framework will do the right thing based on the version. We could also remove `version` from the arguments. -- 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