diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/MergeableClusterInvoker.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/MergeableClusterInvoker.java index 3fb10b991cf..056aa363812 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/MergeableClusterInvoker.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/MergeableClusterInvoker.java @@ -73,16 +73,7 @@ protected Result doInvoke(Invocation invocation, List> invokers, Load } } } - Invoker invoker = invokers.iterator().next(); - try { - return invoker.invoke(invocation); - } catch (RpcException e) { - if (e.isNoInvokerAvailableAfterFilter()) { - log.debug("No available provider for service" + getUrl().getServiceKey() + " on group " + invoker.getUrl().getParameter(GROUP_KEY) + ", will continue to try another group."); - } else { - throw e; - } - } + return invokers.iterator().next().invoke(invocation); } Class returnType; @@ -97,15 +88,7 @@ protected Result doInvoke(Invocation invocation, List> invokers, Load for (final Invoker invoker : invokers) { RpcInvocation subInvocation = new RpcInvocation(invocation, invoker); subInvocation.setAttachment(ASYNC_KEY, "true"); - try { - results.put(invoker.getUrl().getServiceKey(), invoker.invoke(subInvocation)); - } catch (RpcException e) { - if (e.isNoInvokerAvailableAfterFilter()) { - log.debug("No available provider for service" + getUrl().getServiceKey() + " on group " + invoker.getUrl().getParameter(GROUP_KEY) + ", will continue to try another group."); - } else { - throw e; - } - } + results.put(invoker.getUrl().getServiceKey(), invoker.invoke(subInvocation)); } Object result = null;