ronfarkash commented on a change in pull request #11372:
URL: https://github.com/apache/pulsar/pull/11372#discussion_r675623617
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/PrecisPublishLimiter.java
##########
@@ -29,17 +30,20 @@
protected volatile long publishMaxByteRate = 0;
protected volatile boolean publishThrottlingEnabled = false;
// precise mode for publish rate limiter
- private RateLimiter topicPublishRateLimiterOnMessage;
- private RateLimiter topicPublishRateLimiterOnByte;
+ private volatile HashMap<String, RateLimiter> rateLimiters;
Review comment:
The reason for the HashMap is to allow the possibility of new
RateLimiters.
Regarding the `volatile` keyword, I might have forgot that it's still there,
I am unsure if it's required for this solution.
--
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]