Nicklee007 commented on code in PR #16573:
URL: https://github.com/apache/pulsar/pull/16573#discussion_r920053672


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/LeastResourceUsageWithWeight.java:
##########
@@ -125,6 +125,11 @@ private double 
updateAndGetMaxResourceUsageWithWeight(String broker, BrokerData
     @Override
     public Optional<String> selectBroker(Set<String> candidates, BundleData 
bundleToAssign, LoadData loadData,

Review Comment:
   It can not be guaranteed after invoke `applyNamespacePolicies`  candidates 
is not empty. there may be not any one broker satisfy the NamespacePolicies for 
the namespace. Like all broker are other namespace's `PrimaryBroker` and the 
bundle's namespace which want be loaded not set any NamespacePolicies, the 
error occurred.



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