bharanic-dev commented on a change in pull request #11916:
URL: https://github.com/apache/pulsar/pull/11916#discussion_r702080171



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/resourcegroup/ResourceQuotaCalculatorImpl.java
##########
@@ -80,6 +74,12 @@ public long computeLocalQuota(long confUsage, long myUsage, 
long[] allUsages) th
         float myUsageFraction = (float) myUsage / totalUsage;
         float calculatedQuota = max(myUsage + residual * myUsageFraction, 0);
 
+        // If the calculated rate ends up being 0, set it to 0. rate value of 
0 or less is assumed to mean that

Review comment:
       @kaushik-develop else-where in the RateLimiter code, that is the 
convention that is currently followed. See the code here:
   
   
https://github.com/apache/pulsar/blob/a7bdc5e25778ada8c781e9b3f9cc4694e5fd3f58/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PrecisPublishLimiter.java#L97
   
   And I don't plan to change the precedence (as that will only cause more 
confusion).




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