mimaison commented on a change in pull request #11599:
URL: https://github.com/apache/kafka/pull/11599#discussion_r793437543



##########
File path: 
clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java
##########
@@ -2681,8 +2681,11 @@ public void handleResponse(AbstractResponse 
abstractResponse) {
                     if (descriptions.size() > 0) {
                         future.complete(descriptions);
                     } else {
-                        // descriptions will be empty if and only if the user 
is not authorized to describe cluster resource.
-                        
future.completeExceptionally(Errors.CLUSTER_AUTHORIZATION_FAILED.exception());
+                        // Up to v3 DescribeLogDirsResponse did not have an 
error code field, hence it defaults to None
+                        Errors error = response.data().errorCode() == 
Errors.NONE.code()

Review comment:
       With v3, if `NONE` is returned there should be some logdirs in the 
response so we should have entered the if condition above.




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