murong00 commented on a change in pull request #6383: [Issue 6043] Support 
force deleting subscription
URL: https://github.com/apache/pulsar/pull/6383#discussion_r389344075
 
 

 ##########
 File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
 ##########
 @@ -1032,6 +1040,73 @@ private void 
internalDeleteSubscriptionForNonPartitionedTopic(AsyncResponse asyn
         }
     }
 
+    protected void internalDeleteSubscriptionForcefully(AsyncResponse 
asyncResponse, String subName, boolean authoritative) {
+        if (topicName.isGlobal()) {
+            validateGlobalNamespaceOwnership(namespaceName);
+        }
+        // If the topic name is a partition name, no need to get partition 
topic metadata again
+        if (topicName.isPartitioned()) {
+            
internalDeleteSubscriptionForNonPartitionedTopicForcefully(asyncResponse, 
subName, authoritative);
+        } else {
+            PartitionedTopicMetadata partitionMetadata = 
getPartitionedTopicMetadata(topicName, authoritative, false);
 
 Review comment:
   done.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to