chenhongSZ commented on code in PR #21212:
URL: https://github.com/apache/pulsar/pull/21212#discussion_r1338603494


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -3565,10 +3566,11 @@ private CompletableFuture<Void> 
updateSubscriptionsDispatcherRateLimiter() {
     protected CompletableFuture<Void> initTopicPolicy() {
         if (brokerService.pulsar().getConfig().isSystemTopicEnabled()
                 && 
brokerService.pulsar().getConfig().isTopicLevelPoliciesEnabled()) {
-            return CompletableFuture.completedFuture(null).thenRunAsync(() -> 
onUpdate(
-                            brokerService.getPulsar().getTopicPoliciesService()
-                                    
.getTopicPoliciesIfExists(TopicName.getPartitionedTopicName(topic))),
-                    brokerService.getTopicOrderedExecutor());
+            return CompletableFuture.completedFuture(null).thenRunAsync(() -> {
+                TopicPoliciesService topicPoliciesService = 
brokerService.getPulsar().getTopicPoliciesService();
+                
onUpdate(topicPoliciesService.getLocalTopicPoliciesIfExists(TopicName.getPartitionedTopicName(topic)));
+                
onUpdate(topicPoliciesService.getGlobalTopicPoliciesIfExists(TopicName.getPartitionedTopicName(topic)));

Review Comment:
   I think this change has covered in 
`org.apache.pulsar.broker.admin.TopicPoliciesTest#testInitPolicesCacheAndNotifyListeners`
   the test will fail without this change 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to