This is an automated email from the ASF dual-hosted git repository.

xyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 882ce415c94 [improve][broker] Apply loadBalancerDebugModeEnabled in 
LeastResourceUsageWithWeight (#22549)
882ce415c94 is described below

commit 882ce415c94db215c6f06aa5212b6d321231e35e
Author: Yunze Xu <xyzinfern...@163.com>
AuthorDate: Tue Apr 23 13:42:22 2024 +0800

    [improve][broker] Apply loadBalancerDebugModeEnabled in 
LeastResourceUsageWithWeight (#22549)
---
 .../loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java
 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java
index 98986d84b98..9bf16ac1795 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/loadbalance/extensions/strategy/LeastResourceUsageWithWeight.java
@@ -96,8 +96,7 @@ public class LeastResourceUsageWithWeight implements 
BrokerSelectionStrategy {
         // select one of them at the end.
         double totalUsage = 0.0d;
 
-        // TODO: use loadBalancerDebugModeEnabled too.
-        boolean debugMode = log.isDebugEnabled();
+        boolean debugMode = log.isDebugEnabled() || 
conf.isLoadBalancerDebugModeEnabled();
         for (String broker : candidates) {
             var brokerLoadDataOptional = 
context.brokerLoadDataStore().get(broker);
             if (brokerLoadDataOptional.isEmpty()) {

Reply via email to