zhanghaou commented on code in PR #20613:
URL: https://github.com/apache/pulsar/pull/20613#discussion_r1236212373
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java:
##########
@@ -362,13 +362,20 @@ private void
initPolicesCache(SystemTopicClient.Reader<PulsarEvent> reader, Comp
policyCacheInitMap.computeIfPresent(
reader.getSystemTopic().getTopicName().getNamespaceObject(), (k, v) -> true);
// replay policy message
- policiesCache.forEach(((topicName, topicPolicies) -> {
- if (listeners.get(topicName) != null) {
- for (TopicPolicyListener<TopicPolicies> listener :
listeners.get(topicName)) {
- listener.onUpdate(topicPolicies);
+ try {
+ policiesCache.forEach(((topicName, topicPolicies) -> {
+ if (listeners.get(topicName) != null) {
+ for (TopicPolicyListener<TopicPolicies> listener :
listeners.get(topicName)) {
+ listener.onUpdate(topicPolicies);
+ }
}
- }
- }));
+ }));
+ } catch (Exception e) {
Review Comment:
Fixed.
--
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]