oneby-wang commented on code in PR #24714:
URL: https://github.com/apache/pulsar/pull/24714#discussion_r2330303730


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationService.java:
##########
@@ -219,7 +219,7 @@ public CompletableFuture<Boolean> canProduceAsync(TopicName 
topicName, String ro
         if (!this.conf.isAuthorizationEnabled()) {
             return CompletableFuture.completedFuture(true);
         }
-        return provider.isSuperUser(role, authenticationData, 
conf).thenComposeAsync(isSuperUser -> {
+        return provider.isSuperUser(role, authenticationData, 
conf).thenCompose(isSuperUser -> {

Review Comment:
   I think in AuthorizationService, we can do this change, because all 
operations after thenComposeAsync are asynchronous (async) operations. I'm not 
sure if my understanding is correct.
   
https://github.com/apache/pulsar/blob/56399ee448d7c3f3ba132206bb9425b8371f3301/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationService.java#L241-L254
   and
   
https://github.com/apache/pulsar/blob/56399ee448d7c3f3ba132206bb9425b8371f3301/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationService.java#L216-L229
   and 
   
https://github.com/apache/pulsar/blob/56399ee448d7c3f3ba132206bb9425b8371f3301/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authorization/AuthorizationService.java#L324-L336



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to