nodece commented on a change in pull request #14051:
URL: https://github.com/apache/pulsar/pull/14051#discussion_r800420628



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -2866,44 +2866,50 @@ protected void 
internalGetBacklogSizeByMessageId(AsyncResponse asyncResponse,
     }
 
     protected CompletableFuture<Void> 
internalSetBacklogQuota(BacklogQuota.BacklogQuotaType backlogQuotaType,
-                                           BacklogQuotaImpl backlogQuota, 
boolean isGlobal) {
-        validateTopicPolicyOperation(topicName, PolicyName.BACKLOG, 
PolicyOperation.WRITE);
-        validatePoliciesReadOnlyAccess();
-
+                                                              BacklogQuotaImpl 
backlogQuota, boolean isGlobal) {
         BacklogQuota.BacklogQuotaType finalBacklogQuotaType = backlogQuotaType 
== null
                 ? BacklogQuota.BacklogQuotaType.destination_storage : 
backlogQuotaType;
+        CompletableFuture<Void> future =

Review comment:
       ```suggestion
           return validateTopicPolicyOperationAsync(topicName, 
PolicyName.BACKLOG, PolicyOperation.WRITE)
                   .thenAccept(__ -> validatePoliciesReadOnlyAccess())
                   .thenCompose(__ -> getTopicPoliciesAsyncWithRetry(topicName, 
isGlobal))
                   .thenCompose(op -> {
   ```




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