nodece commented on code in PR #17338:
URL: https://github.com/apache/pulsar/pull/17338#discussion_r959159720
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:
##########
@@ -307,20 +314,33 @@ protected void internalDeleteNamespace(AsyncResponse
asyncResponse, boolean auth
}
// remove from owned namespace map and ephemeral node from ZK
- final List<CompletableFuture<Void>> futures = Lists.newArrayList();
+ final List<CompletableFuture<Void>> deletePartitionedTopicFuture =
Lists.newArrayList();
// remove system topics first.
- if (!topics.isEmpty()) {
- for (String topic : topics) {
+ if (!partitionedTopicNames.isEmpty()) {
+ for (String topic : partitionedTopicNames) {
try {
-
futures.add(pulsar().getAdminClient().topics().deleteAsync(topic, true, true));
Review Comment:
You only need to distinct partitionedTopicName and nonPartitionedTopicName
here.
```java
TopicName topicName = TopicName.get(topic);
if (topicName.isPartitioned()) {
futures.add(pulsar().getAdminClient().topics().deletePartitionedTopicAsync(topic,
true));
} else {
futures.add(pulsar().getAdminClient().topics().deleteAsync(topic, true));
}
```
--
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]