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/07/08 02:14:03 UTC

[GitHub] [pulsar] Technoboy- commented on a diff in pull request #16438: [improve][metadataStore] Update namespace policies would cause metadata-store thread waiting too long

Technoboy- commented on code in PR #16438:
URL: https://github.com/apache/pulsar/pull/16438#discussion_r916408135


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java:
##########
@@ -2045,20 +2045,20 @@ private void handlePoliciesUpdates(NamespaceName namespace) {
                         if (namespace.includes(TopicName.get(name))) {
                             // If the topic is already created, immediately apply the updated policies, otherwise
                             // once the topic is created it'll apply the policies update
-                            topicFuture.thenAccept(topic -> {
+                            topicFuture.thenAcceptAsync(topic -> {
                                 if (log.isDebugEnabled()) {
                                     log.debug("Notifying topic that policies have changed: {}", name);
                                 }
 
                                 topic.ifPresent(t -> t.onPoliciesUpdate(policies));
-                            });
+                            }, pulsar.getExecutor());

Review Comment:
   Maybe we don't need to add executor here. 



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