[feat][broker]: support dynamic update topic broker-level publish-rate#14387
[feat][broker]: support dynamic update topic broker-level publish-rate#14387codelipenghui merged 3 commits intoapache:masterfrom
Conversation
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
Show resolved
Hide resolved
|
/pulsarbot run-failure-checks |
Jason918
left a comment
There was a problem hiding this comment.
Overall LGTM.
Please add unit test for broker level dynamic updating, we missed cover this case.
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
Show resolved
Hide resolved
|
+1 please add test for the new changes. |
ec3ea32 to
1d49557
Compare
|
/pulsarbot run-failure-checks |
...roker/src/test/java/org/apache/pulsar/broker/service/PrecisTopicPublishRateThrottleTest.java
Show resolved
Hide resolved
| MessageId messageId = null; | ||
| try { | ||
| // first will be success, and will set auto read to false | ||
| messageId = producer.sendAsync(new byte[expectedRate]).get(500, TimeUnit.MILLISECONDS); |
There was a problem hiding this comment.
I think we only need to check the dynamic update is been applied, do not need to check if the rate limier is works or not? because the rate limiter is tested by other tests.
So that we don't introduce Thread.sleep() in this test, which might introduce new flaky tests.
There was a problem hiding this comment.
I think we only need to check the dynamic update is been applied, do not need to check if the rate limier is works or not?
+1
There was a problem hiding this comment.
Have updated the UT, PTAL @codelipenghui @Jason918
|
/pulsarbot run-failure-checks |
apache#14387) ### Motivation Dynamic update topic broker-level publish-rate. ### Modifications Invoke `org.apache.pulsar.broker.service.BrokerService#registerConfigurationListener` to register listeners about `maxPublishRatePerTopicInMessages` and `maxPublishRatePerTopicInBytes`
apache#14387) ### Motivation Dynamic update topic broker-level publish-rate. ### Modifications Invoke `org.apache.pulsar.broker.service.BrokerService#registerConfigurationListener` to register listeners about `maxPublishRatePerTopicInMessages` and `maxPublishRatePerTopicInBytes`
apache#14387) Dynamic update topic broker-level publish-rate. Invoke `org.apache.pulsar.broker.service.BrokerService#registerConfigurationListener` to register listeners about `maxPublishRatePerTopicInMessages` and `maxPublishRatePerTopicInBytes`
Motivation
Dynamic update topic broker-level publish-rate.
Modifications
Invoke
org.apache.pulsar.broker.service.BrokerService#registerConfigurationListenerto register listenersabout
maxPublishRatePerTopicInMessagesandmaxPublishRatePerTopicInBytesVerifying this change
org.apache.pulsar.broker.service.PrecisTopicPublishRateThrottleTest#testMultiLevelPublishRateto test the caseDoes this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation
no-need-doc