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 2022/08/31 01:23:37 UTC
[dubbo] branch 3.1 updated: Update AbstractClusterInvoker.java (#10522)
This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.1 by this push:
new ed34934606 Update AbstractClusterInvoker.java (#10522)
ed34934606 is described below
commit ed349346064c3ec58afa8d58ccedc844a89c8089
Author: xin gu <41...@qq.com>
AuthorDate: Wed Aug 31 09:23:29 2022 +0800
Update AbstractClusterInvoker.java (#10522)
faq
---
.../apache/dubbo/rpc/cluster/support/AbstractClusterInvoker.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/AbstractClusterInvoker.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/AbstractClusterInvoker.java
index 5406ac677c..8f13c7a964 100644
--- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/AbstractClusterInvoker.java
+++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/AbstractClusterInvoker.java
@@ -20,7 +20,7 @@ import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.Version;
import org.apache.dubbo.common.config.Configuration;
import org.apache.dubbo.common.config.ConfigurationUtils;
-import org.apache.dubbo.common.logger.Logger;
+import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
import org.apache.dubbo.common.logger.LoggerFactory;
import org.apache.dubbo.common.profiler.ProfilerSwitch;
import org.apache.dubbo.common.utils.CollectionUtils;
@@ -59,7 +59,7 @@ import static org.apache.dubbo.rpc.cluster.Constants.DEFAULT_CLUSTER_STICKY;
*/
public abstract class AbstractClusterInvoker<T> implements ClusterInvoker<T> {
- private static final Logger logger = LoggerFactory.getLogger(AbstractClusterInvoker.class);
+ private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(AbstractClusterInvoker.class);
protected Directory<T> directory;
@@ -213,11 +213,11 @@ public abstract class AbstractClusterInvoker<T> implements ClusterInvoker<T> {
//Avoid collision
invoker = invokers.get((index + 1) % invokers.size());
} catch (Exception e) {
- logger.warn(e.getMessage() + " may because invokers list dynamic change, ignore.", e);
+ logger.warn("2-5","select invokers exception","",e.getMessage() + " may because invokers list dynamic change, ignore.",e);
}
}
} catch (Throwable t) {
- logger.error("cluster reselect fail reason is :" + t.getMessage() + " if can not solve, you can set cluster.availablecheck=false in url", t);
+ logger.error("2-5","failed to reselect invokers","","cluster reselect fail reason is :" + t.getMessage() + " if can not solve, you can set cluster.availablecheck=false in url",t);
}
}