diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailoverClusterInvoker.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailoverClusterInvoker.java index 25d4704602d..0ae150f4be3 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailoverClusterInvoker.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailoverClusterInvoker.java @@ -53,8 +53,8 @@ public FailoverClusterInvoker(Directory directory) { @Override @SuppressWarnings({"unchecked", "rawtypes"}) public Result doInvoke(Invocation invocation, final List> invokers, LoadBalance loadbalance) throws RpcException { - List> copyinvokers = invokers; - checkInvokers(copyinvokers, invocation); + List> copyInvokers = invokers; + checkInvokers(copyInvokers, invocation); String methodName = RpcUtils.getMethodName(invocation); int len = getUrl().getMethodParameter(methodName, Constants.RETRIES_KEY, Constants.DEFAULT_RETRIES) + 1; if (len <= 0) { @@ -62,18 +62,18 @@ public Result doInvoke(Invocation invocation, final List> invokers, L } // retry loop. RpcException le = null; // last exception. - List> invoked = new ArrayList>(copyinvokers.size()); // invoked invokers. + List> invoked = new ArrayList>(copyInvokers.size()); // invoked invokers. Set providers = new HashSet(len); for (int i = 0; i < len; i++) { //Reselect before retry to avoid a change of candidate `invokers`. //NOTE: if `invokers` changed, then `invoked` also lose accuracy. if (i > 0) { checkWhetherDestroyed(); - copyinvokers = list(invocation); + copyInvokers = list(invocation); // check again - checkInvokers(copyinvokers, invocation); + checkInvokers(copyInvokers, invocation); } - Invoker invoker = select(loadbalance, invocation, copyinvokers, invoked); + Invoker invoker = select(loadbalance, invocation, copyInvokers, invoked); invoked.add(invoker); RpcContext.getContext().setInvokers((List) invoked); try { @@ -83,7 +83,7 @@ public Result doInvoke(Invocation invocation, final List> invokers, L + " in the service " + getInterface().getName() + " was successful by the provider " + invoker.getUrl().getAddress() + ", but there have been failed providers " + providers - + " (" + providers.size() + "/" + copyinvokers.size() + + " (" + providers.size() + "/" + copyInvokers.size() + ") from the registry " + directory.getUrl().getAddress() + " on the consumer " + NetUtils.getLocalHost() + " using the dubbo version " + Version.getVersion() + ". Last error is: " @@ -104,7 +104,7 @@ public Result doInvoke(Invocation invocation, final List> invokers, L throw new RpcException(le.getCode(), "Failed to invoke the method " + methodName + " in the service " + getInterface().getName() + ". Tried " + len + " times of the providers " + providers - + " (" + providers.size() + "/" + copyinvokers.size() + + " (" + providers.size() + "/" + copyInvokers.size() + ") from the registry " + directory.getUrl().getAddress() + " on the consumer " + NetUtils.getLocalHost() + " using the dubbo version " + Version.getVersion() + ". Last error is: "