mattisonchao commented on code in PR #19374:
URL: https://github.com/apache/pulsar/pull/19374#discussion_r1092538239


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java:
##########
@@ -246,9 +246,6 @@ protected void updateTopicPolicyByNamespacePolicy(Policies 
namespacePolicies) {
         if (log.isDebugEnabled()) {
             log.debug("[{}]updateTopicPolicyByNamespacePolicy,data={}", topic, 
namespacePolicies);
         }
-        if (namespacePolicies.deleted) {

Review Comment:
   @eolivelli 
   
   If I don't remove this check, the creating topic in the deleted namespace 
will automatically be forcefully deleted by `checkReplication` method and 
conflict with namespace deletion. because the `replicationClusters` is null. 
See the logic details:
   
   
https://github.com/apache/pulsar/blob/17c58a539315cc4ea39655d4328c5caf55f87d3d/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java#L1468-L1479
    
   Obviously, This behaviour doesn't have any problem. We just delete the topic 
at the same time twice.  but I don't think it's a good approach to delete this 
kind of topic(`the creating topic in the deleted namespace will automatically 
be forcefully deleted `) with this method, because it is randomness and that 
can only confuse some internal behaviour.
   
   Maybe I can revert this change and then handle the conflict exception. what 
do you think? 
   /cc @eolivelli @dlg99 



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