You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ma...@apache.org on 2022/05/25 06:56:45 UTC

[pulsar] branch branch-2.9 updated: [fix][broker]Close publishLimiter when disable it (#15520)

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

mattisonchao pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/branch-2.9 by this push:
     new 42353c04151 [fix][broker]Close publishLimiter when disable it (#15520)
42353c04151 is described below

commit 42353c04151f06f26bf87629b04c94ce4610fe7a
Author: Xiaoyu Hou <An...@gmail.com>
AuthorDate: Wed May 11 20:20:28 2022 +0800

    [fix][broker]Close publishLimiter when disable it (#15520)
    
    (cherry picked from commit e8c971a2f15d9fe79eb88f92c022216a0ca57f73)
---
 .../src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java  | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
index dedca9cced4..ba4756647a5 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
@@ -956,6 +956,9 @@ public abstract class AbstractTopic implements Topic {
             }
         } else {
             log.info("Disabling publish throttling for {}", this.topic);
+            if (topicPublishRateLimiter != null) {
+                topicPublishRateLimiter.close();
+            }
             this.topicPublishRateLimiter = PublishRateLimiter.DISABLED_RATE_LIMITER;
             enableProducerReadForPublishRateLimiting();
         }