You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/19 01:57:27 UTC

[GitHub] [pulsar] codelipenghui commented on a diff in pull request #17706: [fix][broker] Fix namespace backlog quota check with retention.

codelipenghui commented on code in PR #17706:
URL: https://github.com/apache/pulsar/pull/17706#discussion_r973818490


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java:
##########
@@ -370,17 +370,21 @@ protected CompletableFuture<Optional<TopicPolicies>> getTopicPoliciesAsyncWithRe
     }
 
     protected boolean checkBacklogQuota(BacklogQuota quota, RetentionPolicies retention) {
-        if (retention == null || retention.getRetentionSizeInMB() <= 0 || retention.getRetentionTimeInMinutes() <= 0) {
+        if (retention == null
+                || (retention.getRetentionSizeInMB() <= 0 && retention.getRetentionTimeInMinutes() <= 0)) {

Review Comment:
   Looks like the added test can't cover this branch?



-- 
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: commits-unsubscribe@pulsar.apache.org

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