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:44 UTC

[dubbo] branch 3.0 updated: Failed retries of failback should be judged first (#8715) (#8719)

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new a09cece  Failed retries of failback should be judged first (#8715) (#8719)
a09cece is described below

commit a09cece9d5cc8f9ce47629329a12d40cc244a62d
Author: passer <wh...@gmail.com>
AuthorDate: Sat Sep 11 21:40:30 2021 +0800

    Failed retries of failback should be judged first (#8715) (#8719)
---
 .../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 71b11a2..46fdddd 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
@@ -107,7 +107,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, consumerUrl);
+            if (retries > 0) {
+                addFailed(loadbalance, invocation, invokers, invoker, consumerUrl);
+            }
             return AsyncRpcResult.newDefaultAsyncResult(null, null, invocation); // ignore
         }
     }