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/06/17 03:35:22 UTC

[GitHub] [pulsar] AnonHxy commented on a diff in pull request #16084: [Fix][broker]Fix topic dispatch rate limiter not init on broker-level

AnonHxy commented on code in PR #16084:
URL: https://github.com/apache/pulsar/pull/16084#discussion_r899733937


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -2371,11 +2371,9 @@ private void updateTopicMessageDispatchRate() {
         this.pulsar().getExecutor().execute(() -> {
             // update message-rate for each topic
             forEachTopic(topic -> {
-                if (topic instanceof AbstractTopic) {
-                    ((AbstractTopic) topic).updateBrokerDispatchRate();
-                }
-                if (topic.getDispatchRateLimiter().isPresent()) {
-                    topic.getDispatchRateLimiter().get().updateDispatchRate();
+                if (topic instanceof PersistentTopic) {

Review Comment:
   Yes. Because `dispatchRateLimiter` is private in `PersistentTopic`, so I think it 's ok just updating `PersistentTopic` dispatch rate @Jason918 



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