This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.2 by this push:
new 33f688e404 Update AdaptiveLoadBalance.java (#12636)
33f688e404 is described below
commit 33f688e4047ab62c28a401b2ef35301bac9b1234
Author: why技术 <[email protected]>
AuthorDate: Sun Jul 2 16:00:47 2023 +0800
Update AdaptiveLoadBalance.java (#12636)
fix getTimeout bug
---
.../org/apache/dubbo/rpc/cluster/loadbalance/AdaptiveLoadBalance.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/AdaptiveLoadBalance.java
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/AdaptiveLoadBalance.java
index a406987c97..7f99e371af 100644
---
a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/AdaptiveLoadBalance.java
+++
b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/AdaptiveLoadBalance.java
@@ -110,7 +110,7 @@ public class AdaptiveLoadBalance extends
AbstractLoadBalance {
private <T> Invoker<T> chooseLowLoadInvoker(Invoker<T> invoker1,Invoker<T>
invoker2,Invocation invocation){
int weight1 = getWeight(invoker1, invocation);
int weight2 = getWeight(invoker2, invocation);
- int timeout1 = getTimeout(invoker2, invocation);
+ int timeout1 = getTimeout(invoker1, invocation);
int timeout2 = getTimeout(invoker2, invocation);
long load1 =
Double.doubleToLongBits(adaptiveMetrics.getLoad(getServiceKey(invoker1,invocation),weight1,timeout1
));
long load2 =
Double.doubleToLongBits(adaptiveMetrics.getLoad(getServiceKey(invoker2,invocation),weight2,timeout2
));