This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch 2.6.x in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/2.6.x by this push: new a9f0762 fix #6369, Consumer cant set correct retries via generic invocation (#6370) a9f0762 is described below commit a9f0762f5e7a20ef7fad8ab78de0578b5ddc0b30 Author: Shadow <shadowzjm...@gmail.com> AuthorDate: Fri Jul 3 10:10:04 2020 +0800 fix #6369, Consumer cant set correct retries via generic invocation (#6370) --- .../com/alibaba/dubbo/rpc/cluster/support/FailoverClusterInvoker.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/support/FailoverClusterInvoker.java b/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/support/FailoverClusterInvoker.java index 525f3d0..de1ea9d 100644 --- a/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/support/FailoverClusterInvoker.java +++ b/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/support/FailoverClusterInvoker.java @@ -28,6 +28,7 @@ import com.alibaba.dubbo.rpc.RpcContext; import com.alibaba.dubbo.rpc.RpcException; import com.alibaba.dubbo.rpc.cluster.Directory; import com.alibaba.dubbo.rpc.cluster.LoadBalance; +import com.alibaba.dubbo.rpc.support.RpcUtils; import java.util.ArrayList; import java.util.HashSet; @@ -54,7 +55,8 @@ public class FailoverClusterInvoker<T> extends AbstractClusterInvoker<T> { public Result doInvoke(Invocation invocation, final List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException { List<Invoker<T>> copyinvokers = invokers; checkInvokers(copyinvokers, invocation); - int len = getUrl().getMethodParameter(invocation.getMethodName(), Constants.RETRIES_KEY, Constants.DEFAULT_RETRIES) + 1; + String methodName = RpcUtils.getMethodName(invocation); + int len = getUrl().getMethodParameter(methodName, Constants.RETRIES_KEY, Constants.DEFAULT_RETRIES) + 1; if (len <= 0) { len = 1; }