This is an automated email from the ASF dual-hosted git repository.
earthchen pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new 633bdbd08f fix(rpc-triple): Fix missing error code (#13379)
633bdbd08f is described below
commit 633bdbd08f207138ad7dc01c6be46c384c30ff4a
Author: Sean Yang <[email protected]>
AuthorDate: Mon Nov 20 12:56:31 2023 +0800
fix(rpc-triple): Fix missing error code (#13379)
---
.../src/main/java/org/apache/dubbo/config/ApplicationConfig.java | 3 +++
.../rpc/protocol/tri/h12/AbstractServerTransportListener.java | 9 +++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
b/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
index 7cde272bfb..cdb8c09954 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java
@@ -801,6 +801,9 @@ public class ApplicationConfig extends AbstractConfig {
if (StringUtils.isEmpty(getName())) {
this.setName(DEFAULT_APP_NAME);
LOGGER.warn(
+ COMMON_UNEXPECTED_EXCEPTION,
+ "",
+ "",
"No application name was set, '" + DEFAULT_APP_NAME
+ "' will be used as the default application name,"
+ " it's highly recommended to set a unique and
customized name for it can be critical for some service governance features.");
diff --git
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/h12/AbstractServerTransportListener.java
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/h12/AbstractServerTransportListener.java
index 4780dd008c..89f09e93a5 100644
---
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/h12/AbstractServerTransportListener.java
+++
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/h12/AbstractServerTransportListener.java
@@ -63,6 +63,7 @@ import java.util.concurrent.Executor;
import java.util.function.Supplier;
import static
org.apache.dubbo.common.constants.CommonConstants.HEADER_FILTER_KEY;
+import static
org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_ERROR_USE_THREAD_POOL;
import static
org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
import static
org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_FAILED_PARSE;
@@ -122,12 +123,12 @@ public abstract class
AbstractServerTransportListener<HEADER extends RequestMeta
try {
this.executor = initializeExecutor(metadata);
} catch (Throwable throwable) {
- LOGGER.error("initialize executor fail.", throwable);
+ LOGGER.error(COMMON_ERROR_USE_THREAD_POOL, "", "", "initialize
executor fail.", throwable);
onError(throwable);
return;
}
if (this.executor == null) {
- LOGGER.error("executor must be not null.");
+ LOGGER.error(INTERNAL_ERROR, "", "", "executor must be not null.");
onError(new NullPointerException("initializeExecutor return
null"));
return;
}
@@ -135,7 +136,7 @@ public abstract class
AbstractServerTransportListener<HEADER extends RequestMeta
try {
doOnMetadata(metadata);
} catch (Throwable throwable) {
- LOGGER.error("server internal error", throwable);
+ LOGGER.error(INTERNAL_ERROR, "", "", "server internal error",
throwable);
onError(throwable);
}
});
@@ -182,7 +183,7 @@ public abstract class
AbstractServerTransportListener<HEADER extends RequestMeta
try {
doOnData(message);
} catch (Throwable e) {
- LOGGER.error("server internal error", e);
+ LOGGER.error(INTERNAL_ERROR, "", "", "server internal error",
e);
onError(e);
}
});