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/04/25 07:25:21 UTC

[GitHub] [pulsar] horizonzy opened a new issue, #15305: RateLimiter#tryAcquire calculation problem.

horizonzy opened a new issue, #15305:
URL: https://github.com/apache/pulsar/issues/15305

   **Describe the bug**
   https://github.com/apache/pulsar/blob/732410992dfa33df668c6e65c5ab0b2cfe8d355c/pulsar-common/src/main/java/org/apache/pulsar/common/util/RateLimiter.java#L192-L195
   
   there are two problems.
   1. should `acquirePermit + acquiredPermits > this.permits`, not `acquirePermit > this.permits`.
   2. when it over permits, shouldn't increase `acquirePermit`
   
   


-- 
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.apache.org

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


[GitHub] [pulsar] gaozhangmin closed issue #15305: RateLimiter#tryAcquire calculation problem.

Posted by GitBox <gi...@apache.org>.
gaozhangmin closed issue #15305: RateLimiter#tryAcquire calculation problem.
URL: https://github.com/apache/pulsar/issues/15305


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