dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LaughXP (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] LaughXP opened issue #3097: 使用leastactive在provider启动时不会使用预热功能
Date Sat, 29 Dec 2018 09:08:02 GMT
使用leastactive, provider启动后, 由于sameWeight=true(默认都是100), 导致无法走到以下步骤
```java
if (!sameWeight && totalWeight > 0) {
            // If (not every invoker has the same weight & at least one invoker's weight>0),
select randomly based on totalWeight.
            int offsetWeight = random.nextInt(totalWeight);
            // Return a invoker based on the random value.
            for (int i = 0; i < leastCount; i++) {
                int leastIndex = leastIndexs[i];
                offsetWeight -= getWeight(invokers.get(leastIndex), invocation);
                if (offsetWeight <= 0)
                    return invokers.get(leastIndex);
            }
        }
```
就无法调用getWeight方法进行预热。这是一个bug吗?

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3097 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
Mime
View raw message