merlimat commented on a change in pull request #1470: Fix topic deletion for V2 
topics.
URL: https://github.com/apache/incubator-pulsar/pull/1470#discussion_r178182146
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
 ##########
 @@ -464,7 +464,9 @@ protected void internalUnloadTopic(boolean authoritative) {
     protected void internalDeleteTopic(boolean authoritative) {
         validateAdminOperationOnTopic(authoritative);
         Topic topic = getTopicReference(topicName);
-        if (topicName.isGlobal()) {
+
+        // v2 topics have a global name so check if the topic is replicated 
too.
+        if (topicName.isGlobal() && topic.isReplicated()) {
 
 Review comment:
   Here we could just check if it's replicated: `topic.isReplicated()` should 
return false on v1 non-global topics.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to