nicoloboschi commented on code in PR #18804:
URL: https://github.com/apache/pulsar/pull/18804#discussion_r1044247669


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java:
##########
@@ -106,6 +109,19 @@ private CompletableFuture<Void> 
sendTopicPolicyEvent(TopicName topicName, Action
                     new BrokerServiceException.NotAllowedException("Not 
allowed to send event to health check topic"));
         }
         CompletableFuture<Void> result = new CompletableFuture<>();
+        try {
+            final Optional<Policies> namespacePolicies = 
pulsarService.getPulsarResources().getNamespaceResources()

Review Comment:
   done. However I had to move all the method to be async, I'm not fully happy 
because I thought we could cherry-pick to 210 and 211 easily and keeping it as 
a small change, but here we are



##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/AdminApi2Test.java:
##########
@@ -1648,6 +1648,11 @@ public void testDeleteNamespaceWithTopicPolicies() 
throws Exception {
 
         // create namespace2
         String namespace = tenant + "/test-ns2";
+        admin.namespaces().createNamespace(namespace, Set.of("test"));
+        admin.topics().createNonPartitionedTopic(namespace + "/tobedeleted");
+        // verify namespace can be deleted even without topic policy events

Review Comment:
   btw I've added a more specific unit test case



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