This is an automated email from the ASF dual-hosted git repository.
JackieTien97 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new e78f7366134 Avoid stack trace logging for expected create
tree-to-table view failures
e78f7366134 is described below
commit e78f7366134e7f3cbedb463c3f5e9ebb26ba021c
Author: alpass163 <[email protected]>
AuthorDate: Fri Nov 13 19:31:23 2026 +0800
Avoid stack trace logging for expected create tree-to-table view failures
---
.../en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java | 3 +++
.../zh/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java | 4 ++++
.../execution/config/executor/ClusterConfigTaskExecutor.java | 12 ++++++++++++
3 files changed, 19 insertions(+)
diff --git
a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java
b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java
index 574feb482cc..7b627c78386 100644
---
a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java
+++
b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java
@@ -2819,6 +2819,9 @@ public final class DataNodeQueryMessages {
"Failures happened during running ConfigExecution when executing {},
message: {}, status: {}";
public static final String
FAILURES_HAPPENED_DURING_RUNNING_CONFIGEXECUTION_WHEN_EXECUTING_ARG =
"Failures happened during running ConfigExecution when executing {}.";
+ public static final String
+
LOG_FAILED_TO_CREATE_THE_TREE_TO_TABLE_VIEW_ARG_ARG_WITH_STATUS_CODE_ARG_ARG_0A3C8F10
=
+ "Failed to create the tree to table view {}.{} with status code {}:
{}.";
public static final String
FAILED_TO_EXECUTE_CREATE_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG =
"Failed to execute create database {} in config node, status is {}.";
public static final String
FAILED_TO_EXECUTE_ALTER_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG =
diff --git
a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java
b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java
index 3895194221b..e710c422354 100644
---
a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java
+++
b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeQueryMessages.java
@@ -3266,6 +3266,10 @@ public final class DataNodeQueryMessages {
public static final String
FAILURES_HAPPENED_DURING_RUNNING_CONFIGEXECUTION_WHEN_EXECUTING_ARG =
"执行 {} 的 ConfigExecution 期间发生失败。";
+ public static final String
+
LOG_FAILED_TO_CREATE_THE_TREE_TO_TABLE_VIEW_ARG_ARG_WITH_STATUS_CODE_ARG_ARG_0A3C8F10
=
+
+ "创建树转表视图 {}.{} 失败,状态码为 {}:{}。";
public static final String
FAILED_TO_EXECUTE_CREATE_DATABASE_ARG_IN_CONFIG_NODE_STATUS_IS_ARG =
"在 config node 中执行 create database {} 失败,状态为 {}。";
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index 6c893494e02..e2dd0b46579 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -5508,6 +5508,18 @@ public class ClusterConfigTaskExecutor implements
IConfigTaskExecutor {
if (TSStatusCode.SUCCESS_STATUS.getStatusCode() == tsStatus.getCode()) {
future.set(new ConfigTaskResult(TSStatusCode.SUCCESS_STATUS));
+ } else if (tsStatus.getCode() ==
TSStatusCode.DATA_TYPE_MISMATCH.getStatusCode()
+ || tsStatus.getCode() ==
TSStatusCode.MEASUREMENT_NAME_CONFLICT.getStatusCode()) {
+ // Expected user failures: return the status instead of throwing,
otherwise
+ // ConfigExecution logs it with a full stack trace.
+ LOGGER.info(
+ DataNodeQueryMessages
+
.LOG_FAILED_TO_CREATE_THE_TREE_TO_TABLE_VIEW_ARG_ARG_WITH_STATUS_CODE_ARG_ARG_0A3C8F10,
+ database,
+ table.getTableName(),
+ tsStatus.getCode(),
+ tsStatus.getMessage());
+ future.set(new ConfigTaskResult(tsStatus));
} else {
future.setException(
new IoTDBException(getTableErrorMessage(tsStatus, database),
tsStatus.getCode()));