michaeljmarshall commented on a change in pull request #12339:
URL: https://github.com/apache/pulsar/pull/12339#discussion_r728240747



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
##########
@@ -802,9 +780,19 @@ private void updatePublishDispatcher(Policies policies) {
             return;
         }
 
+        Policies policies;
+        try {
+            policies = 
brokerService.pulsar().getPulsarResources().getNamespaceResources().getPoliciesIfCached(
+                            TopicName.get(topic).getNamespaceObject())
+                    .orElseGet(() -> new Policies());

Review comment:
       I see this was added in the most recent commit to help with a mocked 
test. This block doesn't throw any checked exceptions. Do we expect 
`RuntimeExceptions` from it? If we do, should we wrap other similar code blocks 
in this PR with try and catch? If we don't, perhaps we should update the test.




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