You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/01/07 05:08:40 UTC
[GitHub] [pulsar] codelipenghui commented on a change in pull request #13337: Fix delete namespace with 'Cannot delete non empty bundle' issue.
codelipenghui commented on a change in pull request #13337:
URL: https://github.com/apache/pulsar/pull/13337#discussion_r780030164
##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
##########
@@ -262,29 +262,39 @@ protected void internalDeleteNamespace(AsyncResponse asyncResponse, boolean auth
// remove from owned namespace map and ephemeral node from ZK
final List<CompletableFuture<Void>> futures = Lists.newArrayList();
- try {
- // remove system topics first.
- if (!topics.isEmpty()) {
- for (String topic : topics) {
- pulsar().getBrokerService().getTopicIfExists(topic).whenComplete((topicOptional, ex) -> {
- topicOptional.ifPresent(systemTopic -> futures.add(systemTopic.deleteForcefully()));
+ // remove system topics first.
+ if (!topics.isEmpty()) {
+ for (String topic : topics) {
+ pulsar().getBrokerService().getTopicIfExists(topic).whenComplete((topicOptional, ex) -> {
Review comment:
In this case, we have only found the system topic if the system topic is owned by this broker, however, if the system topic is not owned by this broker, we can't find it right?
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org