merlimat commented on a change in pull request #12340:
URL: https://github.com/apache/pulsar/pull/12340#discussion_r727633231



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BacklogQuotaManager.java
##########
@@ -65,13 +65,11 @@ public BacklogQuota getDefaultQuota() {
     }
 
     public BacklogQuota getBacklogQuota(String namespace, String policyPath) {
-        try {
-            return zkCache.get(policyPath)
-                    .map(p -> 
p.backlog_quota_map.getOrDefault(BacklogQuotaType.destination_storage, 
defaultQuota))
-                    .orElse(defaultQuota);
-        } catch (Exception e) {
-            log.warn("Failed to read policies data, will apply the default 
backlog quota: namespace={}", namespace, e);
-            return this.defaultQuota;
+        Policies policies = zkCache.getDataIfPresent(policyPath);

Review comment:
       Yes, though it's similar to when we're getting error/timeout.




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