codelipenghui commented on code in PR #17338:
URL: https://github.com/apache/pulsar/pull/17338#discussion_r971420417
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:
##########
@@ -307,20 +312,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();
Review Comment:
```suggestion
final List<CompletableFuture<Void>> deleteNonPartitionedTopicFuture
= Lists.newArrayList();
```
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java:
##########
@@ -307,20 +312,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 (!nonPartitionedTopicNames.isEmpty()) {
+ for (String topic : nonPartitionedTopicNames) {
try {
-
futures.add(pulsar().getAdminClient().topics().deleteAsync(topic, true, true));
+
deletePartitionedTopicFuture.add(pulsar().getAdminClient().topics().deleteAsync(topic,
true));
} catch (Exception ex) {
- log.error("[{}] Failed to delete system topic {}",
clientAppId(), topic, ex);
+ log.error("[{}] Failed to delete partitioned system topic
{}", clientAppId(), topic, ex);
Review Comment:
```suggestion
log.error("[{}] Failed to delete non-partitioned system
topic {}", clientAppId(), topic, ex);
```
--
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]