315157973 commented on a change in pull request #12367:
URL: https://github.com/apache/pulsar/pull/12367#discussion_r730644984



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java
##########
@@ -141,6 +141,18 @@ private PulsarEvent getPulsarEvent(TopicName topicName, 
ActionType actionType, T
     }
 
     private void notifyListener(Message<PulsarEvent> msg) {
+        // delete policies
+        if (msg.getValue() == null) {
+            TopicName topicName =  
TopicName.get(TopicName.get(msg.getKey()).getPartitionedTopicName());
+            policiesCache.remove(topicName);

Review comment:
       We don't need to remove the cache here. The cache will be cleaned up in 
the method `private void refreshTopicPoliciesCache(Message<PulsarEvent> msg)`




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