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

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

commit fcea0f4122090921bfc69df52d0e334d567d9337
Author: mikecaat <35882227+mikec...@users.noreply.github.com>
AuthorDate: Sun Jul 12 00:51:26 2020 +0900

    Fixes #7512 handle exception when policy is updated. (#7514)
    
    
    (cherry picked from commit a55a405c794741ec10094ddd174fccf0cb4840c7)
---
 .../org/apache/pulsar/broker/service/persistent/PersistentTopic.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 ca7fbd4..2b2e14b 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
@@ -1810,7 +1810,7 @@ public class PersistentTopic extends AbstractTopic 
implements Topic, AddEntryCal
             }
         });
         replicators.forEach((name, replicator) ->
-            replicator.getRateLimiter().get().onPoliciesUpdate(data)
+            replicator.getRateLimiter().ifPresent(rateLimiter -> 
rateLimiter.onPoliciesUpdate(data))
         );
         checkMessageExpiry();
         CompletableFuture<Void> replicationFuture = 
checkReplicationAndRetryOnFailure();

Reply via email to