lhotari commented on a change in pull request #11372:
URL: https://github.com/apache/pulsar/pull/11372#discussion_r675638792



##########
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:
       I don't think there is justification for this HashMap solution. It 
simply doesn't provide any value currently. We don't have a use case for new 
ratelimiters at the moment. The solution can be added for that use case when it 
is needed.




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