eolivelli commented on a change in pull request #11791:
URL: https://github.com/apache/pulsar/pull/11791#discussion_r697213644



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
##########
@@ -306,11 +308,38 @@ protected void internalDeleteNamespace(AsyncResponse 
asyncResponse, boolean auth
             }
 
             try {
+                final String globalPartitionedPath = 
path(PARTITIONED_TOPIC_PATH_ZNODE, namespaceName.toString());
+                final String managedLedgerPath = joinPath(MANAGED_LEDGER_ROOT, 
namespaceName.toString());
+                // check whether partitioned topics znode exist
+                if (namespaceResources().exists(globalPartitionedPath)) {
+                    deleteRecursive(namespaceResources(), 
globalPartitionedPath);
+                }
+
+                try {
+                    if (namespaceResources().exists(managedLedgerPath)) {
+                        pulsar().getPulsarResources().getTopicResources()
+                                .clearDomainPersistence(namespaceName).get();
+                        pulsar().getPulsarResources().getTopicResources()
+                                
.clearNamespacePersistence(namespaceName).get();
+                    }
+                } catch (ExecutionException | InterruptedException e) {
+                    // warn level log here since this failure has no side 
effect besides left a un-used metadata

Review comment:
       in this case it is better to continue the operation.
   logging is fine to me in this case, this is an API request execution and 
InterruptedException means to exist as soon as possible,
   here it is better to complete the operation
   




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