Skip to content

Commit

Permalink
optimize ShortestResponseLoadBalance active param (#8318)
Browse files Browse the repository at this point in the history
  • Loading branch information
24kpure committed Jul 23, 2021
1 parent 352a0df commit 41e989b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -61,7 +61,7 @@ protected <T> Invoker<T> doSelect(List<Invoker<T>> invokers, URL url, Invocation
RpcStatus rpcStatus = RpcStatus.getStatus(invoker.getUrl(), invocation.getMethodName());
// Calculate the estimated response time from the product of active connections and succeeded average elapsed time.
long succeededAverageElapsed = rpcStatus.getSucceededAverageElapsed();
int active = rpcStatus.getActive();
int active = rpcStatus.getActive() + 1;
long estimateResponse = succeededAverageElapsed * active;
int afterWarmup = getWeight(invoker, invocation);
weights[i] = afterWarmup;
Expand Down

0 comments on commit 41e989b

Please sign in to comment.