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/02/21 02:21:58 UTC

[GitHub] [pulsar] AnonHxy commented on a change in pull request #14387: [Broker]Dynamic update topic broker-level publish-rate

AnonHxy commented on a change in pull request #14387:
URL: https://github.com/apache/pulsar/pull/14387#discussion_r810735645



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -1118,4 +1118,9 @@ public void updateBrokerSubscriptionDispatchRate() {
         topicPolicies.getSubscriptionDispatchRate().updateBrokerValue(
             subscriptionDispatchRateInBroker(brokerService.pulsar().getConfiguration()));
     }
+
+    public void updateBrokerPublishRate() {
+        topicPolicies.getPublishRate().updateBrokerValue(
+            publishRateInBroker(brokerService.pulsar().getConfiguration()));

Review comment:
       Yes. But we use the `topicPolicies` is a `HierarchyTopicPolicies` type, which will update value through topic-namespace-broker hierarchy. For details : `org.apache.pulsar.common.policies.data.PolicyHierarchyValue#updateBrokerValue` @wangjialing218 




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