shibd commented on a change in pull request #13337:
URL: https://github.com/apache/pulsar/pull/13337#discussion_r774844622



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/SystemTopicBasedTopicPoliciesService.java
##########
@@ -200,6 +200,20 @@ public TopicPolicies getTopicPolicies(TopicName topicName,
                 : 
policiesCache.get(TopicName.get(topicName.getPartitionedTopicName()));
     }
 
+    @Override
+    public CompletableFuture<Void> removeTopicPoliciesCache(TopicName 
topicName) {
+        NamespaceName namespace = topicName.getNamespaceObject();
+        CompletableFuture<SystemTopicClient.Reader<PulsarEvent>> 
readerCompletableFuture =

Review comment:
       @Technoboy-  Hi, Just closing the reader doesn't seem to work. 
   
   Have some producer will still be reconnection(Then the trigger topic is auto 
created again), May be also  should closed all writer?
   
   And can only do it closed the readers/writers on the current broker. 
   
   ![Pasted 
Graphic](https://user-images.githubusercontent.com/33416836/147308436-1b6ca919-e59d-4594-be4d-4e02ac06f26a.png)
   
   Essential reason, When [disconnect 
producer](https://github.com/apache/pulsar/blob/021409b6e1d3c910afe8e05d51a536cee647cb90/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L1145-L1148),
 Broker will send to client `CLOSE_PRODUCER ` command,  When the producer 
client receives the `CLOSE_PRODUCER`, it will reconnecting, Then the trigger 
topic is auto created again.
   
   ![Pasted Graphic 
1](https://user-images.githubusercontent.com/33416836/147308429-7cab9d02-a9e7-4507-aa84-604555000f63.png)
   
   Why should the client reconnect when delete topic? Should we add new 
commands?  When the client receives the command, it only closes without  
reconnecting.
   
   
   
   
   
   




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