AndrewJSchofield commented on code in PR #19478: URL: https://github.com/apache/kafka/pull/19478#discussion_r2055942446
########## clients/src/main/resources/common/message/DeleteShareGroupOffsetsResponse.json: ########## @@ -43,14 +44,10 @@ "about": "The topic name." }, { "name": "TopicId", "type": "uuid", "versions": "0+", "about": "The unique topic ID." }, - { "name": "Partitions", "type": "[]DeleteShareGroupOffsetsResponsePartition", "versions": "0+", "fields": [ - { "name": "PartitionIndex", "type": "int32", "versions": "0+", - "about": "The partition index." }, - { "name": "ErrorCode", "type": "int16", "versions": "0+", - "about": "The partition-level error code, or 0 if there was no error." }, - { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null", - "about": "The partition-level error message, or null if there was no error." } - ]} + { "name": "ErrorCode", "type": "int16", "versions": "0+", + "about": "The partition-level error code, or 0 if there was no error." }, Review Comment: This is a topic-level error code now. ########## core/src/main/scala/kafka/server/KafkaApis.scala: ########## @@ -3648,12 +3647,8 @@ class KafkaApis(val requestChannel: RequestChannel, deleteShareGroupOffsetsResponseTopics.add( new DeleteShareGroupOffsetsResponseData.DeleteShareGroupOffsetsResponseTopic() .setTopicName(topic.topicName) - .setPartitions(topic.partitions.map(partition => { - new DeleteShareGroupOffsetsResponseData.DeleteShareGroupOffsetsResponsePartition() - .setPartitionIndex(partition) - .setErrorCode(Errors.TOPIC_AUTHORIZATION_FAILED.code) - .setErrorMessage(Errors.TOPIC_AUTHORIZATION_FAILED.message()) - }).toList.asJava) + .setErrorCode(Errors.TOPIC_AUTHORIZATION_FAILED.code) + .setErrorMessage(Errors.TOPIC_AUTHORIZATION_FAILED.message()) Review Comment: It seems to me that the code below that handles the situation in which the set of authorized topics is empty actually sends an entirely empty response. The `deleteShareGroupOffsetsResponseTopics` ought to be in there somewhere :) ########## clients/src/main/resources/common/message/DeleteShareGroupOffsetsResponse.json: ########## @@ -43,14 +44,10 @@ "about": "The topic name." }, { "name": "TopicId", "type": "uuid", "versions": "0+", "about": "The unique topic ID." }, - { "name": "Partitions", "type": "[]DeleteShareGroupOffsetsResponsePartition", "versions": "0+", "fields": [ - { "name": "PartitionIndex", "type": "int32", "versions": "0+", - "about": "The partition index." }, - { "name": "ErrorCode", "type": "int16", "versions": "0+", - "about": "The partition-level error code, or 0 if there was no error." }, - { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null", - "about": "The partition-level error message, or null if there was no error." } - ]} + { "name": "ErrorCode", "type": "int16", "versions": "0+", + "about": "The partition-level error code, or 0 if there was no error." }, + { "name": "ErrorMessage", "type": "string", "versions": "0+", "nullableVersions": "0+", "default": "null", + "about": "The partition-level error message, or null if there was no error." } Review Comment: And this is a topic-level error message. -- 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