mimaison commented on PR #15175:
URL: https://github.com/apache/kafka/pull/15175#issuecomment-2139133566

   Hi @CalvinConfluent,
   
   Thanks for the clarification. The issue is that this causes a compatibility 
change. For example with the following code:
   ```java
   DescribeTopicsOptions options = new 
DescribeTopicsOptions().includeAuthorizedOperations(false);
   TopicCollection topics = 
TopicCollection.ofTopicNames(Collections.singletonList(topic));
   DescribeTopicsResult describeTopicsResult = admin.describeTopics(topics, 
options);
   TopicDescription topicDescription = 
describeTopicsResult.topicNameValues().get(topic).get();
   System.out.println(topicDescription.authorizedOperations());
   ```
   
   In ZooKeeper mode, this prints `null`, while it prints `[ALTER, READ, 
DELETE, ALTER_CONFIGS, CREATE, DESCRIBE_CONFIGS, WRITE, DESCRIBE]` in KRaft 
mode. 
   
   In wonder if the 
[`getTopicDescriptionFromDescribeTopicsResponseTopic`](https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java#L2405C30-L2415)
 method should take into account the options provider by the caller to populate 
or not the `authorizedOperations` field of `TopicDescription`.


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