You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2021/09/11 13:40:58 UTC
[dubbo] branch master updated: fix issue-8715 on master: failback
retries=0 should only invoke once (#8743)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new d3773a7 fix issue-8715 on master: failback retries=0 should only invoke once (#8743)
d3773a7 is described below
commit d3773a774eeaed66d4997519805c14c3f5fb15de
Author: changfu <ch...@gmail.com>
AuthorDate: Sat Sep 11 21:40:49 2021 +0800
fix issue-8715 on master: failback retries=0 should only invoke once (#8743)
---
.../org/apache/dubbo/rpc/cluster/support/FailbackClusterInvoker.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailbackClusterInvoker.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailbackClusterInvoker.java
index 1528070..0d2d6d1 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailbackClusterInvoker.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailbackClusterInvoker.java
@@ -102,7 +102,9 @@ public class FailbackClusterInvoker<T> extends AbstractClusterInvoker<T> {
} catch (Throwable e) {
logger.error("Failback to invoke method " + invocation.getMethodName() + ", wait for retry in background. Ignored exception: "
+ e.getMessage() + ", ", e);
- addFailed(loadbalance, invocation, invokers, invoker);
+ if (retries > 0) {
+ addFailed(loadbalance, invocation, invokers, invoker);
+ }
return AsyncRpcResult.newDefaultAsyncResult(null, null, invocation); // ignore
}
}