This is an automated email from the ASF dual-hosted git repository.

jianghaiting pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 7646db86b95 Remove repeated subscribeRateLimiter update (#15554)
7646db86b95 is described below

commit 7646db86b9577a61b18f1f2928f261733415c954
Author: Xiaoyu Hou <[email protected]>
AuthorDate: Fri May 13 22:00:36 2022 +0800

    Remove repeated subscribeRateLimiter update (#15554)
---
 .../apache/pulsar/broker/service/persistent/PersistentTopic.java  | 8 --------
 1 file changed, 8 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
index 96e91afbdf6..cd75b745bba 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
@@ -2430,10 +2430,6 @@ public class PersistentTopic extends AbstractTopic 
implements Topic, AddEntryCal
                 CompletableFuture<Void> persistentPoliciesFuture = 
checkPersistencePolicies();
                 // update rate-limiter if policies updated
                 
dispatchRateLimiter.ifPresent(DispatchRateLimiter::updateDispatchRate);
-                if (this.subscribeRateLimiter.isPresent()) {
-                    
subscribeRateLimiter.get().onSubscribeRateUpdate(getSubscribeRate());
-                }
-
                 return CompletableFuture.allOf(replicationFuture, dedupFuture, 
persistentPoliciesFuture,
                         preCreateSubscriptionForCompactionIfNeeded());
             });
@@ -3049,10 +3045,6 @@ public class PersistentTopic extends AbstractTopic 
implements Topic, AddEntryCal
         FutureUtil.waitForAll(consumerCheckFutures).thenRun(() -> {
             updatePublishDispatcher();
             updateSubscribeRateLimiter();
-            if (this.subscribeRateLimiter.isPresent()) {
-                subscribeRateLimiter.ifPresent(subscribeRateLimiter ->
-                        
subscribeRateLimiter.onSubscribeRateUpdate(getSubscribeRate()));
-            }
             replicators.forEach((name, replicator) -> 
replicator.getRateLimiter()
                     .ifPresent(DispatchRateLimiter::updateDispatchRate));
 

Reply via email to