You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
Dubbo version: 2.7.8
Operating System version: macos
Java version: 1.8
dubbo2.7.8 BroadcastClusterInvoker source code.
public Result doInvoke(final Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
checkInvokers(invokers, invocation);
RpcContext.getContext().setInvokers((List) invokers);
RpcException exception = null;
Result result = null;
for (Invoker<T> invoker : invokers) {
try {
result = invoker.invoke(invocation);
} catch (RpcException e) {
exception = e;
logger.warn(e.getMessage(), e);
} catch (Throwable e) {
exception = new RpcException(e.getMessage(), e);
logger.warn(e.getMessage(), e);
}
}
if (exception != null) {
throw exception;
}
return result;
}
I think that when an exception occurs during the execution of the invoker.invoke method, the subsequent invoker can no longer be executed. This is meaningless, and you can return directly at this time.
The code is modified to:
public Result doInvoke(final Invocation invocation, List<Invoker<T>> invokers, LoadBalance loadbalance) throws RpcException {
checkInvokers(invokers, invocation);
RpcContext.getContext().setInvokers((List) invokers);
RpcException exception = null;
Result result = null;
for (Invoker<T> invoker : invokers) {
try {
result = invoker.invoke(invocation);
} catch (RpcException e) {
exception = e;
logger.warn(e.getMessage(), e);
} catch (Throwable e) {
exception = new RpcException(e.getMessage(), e);
logger.warn(e.getMessage(), e);
}
if (exception != null) {
throw exception;
}
}
return result;
}
The text was updated successfully, but these errors were encountered:
Environment
dubbo2.7.8 BroadcastClusterInvoker source code.
I think that when an exception occurs during the execution of the invoker.invoke method, the subsequent invoker can no longer be executed. This is meaningless, and you can return directly at this time.
The code is modified to:
The text was updated successfully, but these errors were encountered: