315157973 commented on code in PR #17456:
URL: https://github.com/apache/pulsar/pull/17456#discussion_r969839341
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/impl/ThresholdShedder.java:
##########
@@ -227,4 +236,59 @@ private double updateAvgResourceUsage(String broker,
LocalBrokerData localBroker
return historyUsage;
}
+ private void tryLowerBoundaryShedding(LoadData loadData,
ServiceConfiguration conf) {
+ // Select the broker with the most resource usage.
+ final double threshold =
conf.getLoadBalancerBrokerThresholdShedderPercentage() / 100.0;
Review Comment:
Every time the method is called, it will be calculated at most once.
Its value depends on the parameters of the method, so it cannot be specified
in the constructor, so it needs to be calculated every time
--
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]