iosdev747 commented on code in PR #23094: URL: https://github.com/apache/pulsar/pull/23094#discussion_r1696503879
########## pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java: ########## @@ -771,8 +781,13 @@ private CompletableFuture<Void> filterAndUnloadMatchedNamespaceAsync(NamespaceIs .map(tenant -> adminClient.namespaces().getNamespacesAsync(tenant)); return FutureUtil.waitForAll(completableFutureStream) .thenApply(namespaces -> { - // if namespace match any policy regex, add it to ns list to be unload. + // Filter namespaces that have current cluster in their replication_clusters + // if namespace match any policy regex, add it to ns list to be unloaded. return namespaces.stream() + .filter(namespaceName -> adminClient.namespaces() + .getPoliciesAsync(namespaceName) + .thenApply(policies -> policies.replication_clusters.contains(cluster)) + .join()) .filter(namespaceName -> policyData.getNamespaces().stream().anyMatch(namespaceName::matches)) Review Comment: Addressed in https://github.com/apache/pulsar/pull/23100 -- 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-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org