chia7712 commented on a change in pull request #9435:
URL: https://github.com/apache/kafka/pull/9435#discussion_r526616584



##########
File path: core/src/main/scala/kafka/server/KafkaApis.scala
##########
@@ -1333,7 +1343,17 @@ class KafkaApis(val requestChannel: RequestChannel,
       }
     }
 
-    val completeTopicMetadata = topicMetadata ++ 
unauthorizedForCreateTopicMetadata ++ unauthorizedForDescribeTopicMetadata
+    val completeTopicMetadata = (if (metadataRequest.isAllTopics) {

Review comment:
       Could we do this filter early? For example, how about filtering 
```getTopicMetadata``` directly? That makes all fixes be in one place and 
following authorized ops can skip "unknown partition/topic" as well.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to