2828import org .apache .dubbo .rpc .RpcException ;
2929import org .apache .dubbo .rpc .cluster .Directory ;
3030import org .apache .dubbo .rpc .cluster .LoadBalance ;
31+ import org .apache .dubbo .rpc .support .RpcUtils ;
3132
3233import java .util .ArrayList ;
3334import java .util .HashSet ;
@@ -54,7 +55,8 @@ public FailoverClusterInvoker(Directory<T> directory) {
5455 public Result doInvoke (Invocation invocation , final List <Invoker <T >> invokers , LoadBalance loadbalance ) throws RpcException {
5556 List <Invoker <T >> copyinvokers = invokers ;
5657 checkInvokers (copyinvokers , invocation );
57- int len = getUrl ().getMethodParameter (invocation .getMethodName (), Constants .RETRIES_KEY , Constants .DEFAULT_RETRIES ) + 1 ;
58+ String methodName = RpcUtils .getMethodName (invocation );
59+ int len = getUrl ().getMethodParameter (methodName , Constants .RETRIES_KEY , Constants .DEFAULT_RETRIES ) + 1 ;
5860 if (len <= 0 ) {
5961 len = 1 ;
6062 }
@@ -77,7 +79,7 @@ public Result doInvoke(Invocation invocation, final List<Invoker<T>> invokers, L
7779 try {
7880 Result result = invoker .invoke (invocation );
7981 if (le != null && logger .isWarnEnabled ()) {
80- logger .warn ("Although retry the method " + invocation . getMethodName ()
82+ logger .warn ("Although retry the method " + methodName
8183 + " in the service " + getInterface ().getName ()
8284 + " was successful by the provider " + invoker .getUrl ().getAddress ()
8385 + ", but there have been failed providers " + providers
@@ -100,7 +102,7 @@ public Result doInvoke(Invocation invocation, final List<Invoker<T>> invokers, L
100102 }
101103 }
102104 throw new RpcException (le != null ? le .getCode () : 0 , "Failed to invoke the method "
103- + invocation . getMethodName () + " in the service " + getInterface ().getName ()
105+ + methodName + " in the service " + getInterface ().getName ()
104106 + ". Tried " + len + " times of the providers " + providers
105107 + " (" + providers .size () + "/" + copyinvokers .size ()
106108 + ") from the registry " + directory .getUrl ().getAddress ()
0 commit comments