rdhabalia commented on a change in pull request #1647: Fix: remove
local-cluster from replication list of global-namespace should clean topics
URL: https://github.com/apache/incubator-pulsar/pull/1647#discussion_r184277172
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
##########
@@ -661,18 +661,36 @@ void removeSubscription(String subscriptionName) {
return delete(false);
}
+ private CompletableFuture<Void> delete(boolean failIfHasSubscriptions) {
+ return delete(failIfHasSubscriptions, false);
+ }
+
+ /**
+ * Forcefully close all producers/consumers/replicators and deletes the
topic. this function is used when local
+ * cluster is removed from global-namespace replication list. Because
broker doesn't allow lookup if local cluster
+ * is not part of replication cluster list.
+ *
+ * @return
+ */
+ private CompletableFuture<Void> deleteForcefully() {
Review comment:
yes, make sense. I will create a PR for this admin api.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services