Skip to content

Commit

Permalink
[fix] [doc] Fix outdated java-doc of rate limiter (#19014)
Browse files Browse the repository at this point in the history
### Motivation
After PR #8611, the acquiring permits can be larger than configured msg-rate if used by subscribing. But doc was not updated in time.

### Modifications

fix the outdated doc
  • Loading branch information
poorbarcode committed Apr 11, 2023
1 parent b7f7e04 commit 81971e2
Showing 1 changed file with 0 additions and 2 deletions.
Expand Up @@ -99,10 +99,8 @@ public long getAvailableDispatchRateLimitOnByte() {
*/
public boolean tryDispatchPermit(long msgPermits, long bytePermits) {
boolean acquiredMsgPermit = msgPermits <= 0 || dispatchRateLimiterOnMessage == null
// acquiring permits must be < configured msg-rate;
|| dispatchRateLimiterOnMessage.tryAcquire(msgPermits);
boolean acquiredBytePermit = bytePermits <= 0 || dispatchRateLimiterOnByte == null
// acquiring permits must be < configured msg-rate;
|| dispatchRateLimiterOnByte.tryAcquire(bytePermits);
return acquiredMsgPermit && acquiredBytePermit;
}
Expand Down

0 comments on commit 81971e2

Please sign in to comment.