You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "heesung-sn (via GitHub)" <gi...@apache.org> on 2023/03/18 01:10:48 UTC

[GitHub] [pulsar] heesung-sn commented on a diff in pull request #19742: [improve][broker] PIP-192 Excluded bundles with isolation policy or anti-affinity-group policy from topk load bundles

heesung-sn commented on code in PR #19742:
URL: https://github.com/apache/pulsar/pull/19742#discussion_r1140875552


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/scheduler/TransferShedder.java:
##########
@@ -444,17 +444,21 @@ private boolean isTransferable(LoadManagerContext context,
         if (pulsar == null || allocationPolicies == null) {
             return true;
         }
+        var isLoadBalancerSheddingBundlesWithPoliciesEnabled =
+                context.brokerConfiguration().isLoadBalancerSheddingBundlesWithPoliciesEnabled();
         String namespace = LoadManagerShared.getNamespaceNameFromBundleName(bundle);
         final String bundleRange = LoadManagerShared.getBundleRangeFromBundleName(bundle);
         NamespaceBundle namespaceBundle =
                 pulsar.getNamespaceService().getNamespaceBundleFactory().getBundle(namespace, bundleRange);
 
-        if (!canTransferWithIsolationPoliciesToBroker(
+        if (!isLoadBalancerSheddingBundlesWithPoliciesEnabled

Review Comment:
   The above table is correct. Thank you for this catch. Updated the code.



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