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 2020/12/03 06:50:05 UTC

[GitHub] [pulsar] wangjialing218 opened a new pull request #8806: fix force delete namespace did not delete all topics of the namespace

wangjialing218 opened a new pull request #8806:
URL: https://github.com/apache/pulsar/pull/8806


   ### Motivation
   We found a issue that when force deleting a namespace, only topics owned by the broker were deleted, topics owned by other brokers were not deleted.
   
   ### Modifications
   Use admin client to delete the topic, which could delete all topics include those owned by other brokers.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] wangjialing218 commented on pull request #8806: fix force delete namespace did not delete all topics of the namespace

Posted by GitBox <gi...@apache.org>.
wangjialing218 commented on pull request #8806:
URL: https://github.com/apache/pulsar/pull/8806#issuecomment-738494555


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] wangjialing218 commented on pull request #8806: fix force delete namespace did not delete all topics of the namespace

Posted by GitBox <gi...@apache.org>.
wangjialing218 commented on pull request #8806:
URL: https://github.com/apache/pulsar/pull/8806#issuecomment-737775236


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #8806: fix force delete namespace did not delete all topics of the namespace

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #8806:
URL: https://github.com/apache/pulsar/pull/8806#issuecomment-738496093


   Please rebase to the latest master since the master branch was broken before.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] zymap commented on a change in pull request #8806: fix force delete namespace did not delete all topics of the namespace

Posted by GitBox <gi...@apache.org>.
zymap commented on a change in pull request #8806:
URL: https://github.com/apache/pulsar/pull/8806#discussion_r534757877



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
##########
@@ -411,9 +411,12 @@ protected void internalDeleteNamespaceForcefully(AsyncResponse asyncResponse, bo
             // firstly remove all topics including system topics
             if (!topics.isEmpty()) {
                 for (String topic : topics) {
-                    pulsar().getBrokerService().getTopicIfExists(topic).whenComplete((topicOptional, ex) -> {
-                        topicOptional.ifPresent(tp -> futures.add(tp.deleteForcefully()));
-                    });
+                    try {

Review comment:
       Could you please add a test for it?




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] wangjialing218 commented on a change in pull request #8806: fix force delete namespace did not delete all topics of the namespace

Posted by GitBox <gi...@apache.org>.
wangjialing218 commented on a change in pull request #8806:
URL: https://github.com/apache/pulsar/pull/8806#discussion_r534826096



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/NamespacesBase.java
##########
@@ -411,9 +411,12 @@ protected void internalDeleteNamespaceForcefully(AsyncResponse asyncResponse, bo
             // firstly remove all topics including system topics
             if (!topics.isEmpty()) {
                 for (String topic : topics) {
-                    pulsar().getBrokerService().getTopicIfExists(topic).whenComplete((topicOptional, ex) -> {
-                        topicOptional.ifPresent(tp -> futures.add(tp.deleteForcefully()));
-                    });
+                    try {

Review comment:
       Added test for force delete namespace 




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] sijie merged pull request #8806: fix force delete namespace did not delete all topics of the namespace

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #8806:
URL: https://github.com/apache/pulsar/pull/8806


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] wangjialing218 commented on pull request #8806: fix force delete namespace did not delete all topics of the namespace

Posted by GitBox <gi...@apache.org>.
wangjialing218 commented on pull request #8806:
URL: https://github.com/apache/pulsar/pull/8806#issuecomment-738542633


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org