grssam commented on code in PR #23120:
URL: https://github.com/apache/pulsar/pull/23120#discussion_r1737934692


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java:
##########
@@ -793,6 +806,44 @@ private CompletableFuture<Void> 
filterAndUnloadMatchedNamespaceAsync(String clus
             if (CollectionUtils.isEmpty(shouldUnloadNamespaces)) {
                 return CompletableFuture.completedFuture(null);
             }
+            // If unload type is 'changed', we need to figure out a further 
subset of namespaces whose placement might
+            // actually have been changed.
+
+            log.debug("Old policy: {} ; new policy: {}", oldPolicy, 
policyData);
+            if (oldPolicy != null && 
NamespaceIsolationPolicyUnloadScope.changed.equals(policyData.getUnloadScope()))
 {
+                // We also compare that the previous primary broker list is 
same as current, in case all namespaces need
+                // to be placed again anyway.
+                List<String> oldBrokers = new 
ArrayList<>(policyData.getPrimary());

Review Comment:
   Whoops. Thank you for catching this. Accepted the change.



-- 
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]

Reply via email to