This is an automated email from the ASF dual-hosted git repository. shuwenwei pushed a commit to branch fixErrorMsg in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 28aaef5d9abc8fbbf92a6ce5e3967c29f0ed39d8 Author: shuwenwei <[email protected]> AuthorDate: Fri Oct 31 11:54:18 2025 +0800 Fix the error message of ConfigExecution --- .../plan/execution/config/ConfigExecution.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/ConfigExecution.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/ConfigExecution.java index 1ae57fe38d5..1880924f297 100644 --- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/ConfigExecution.java +++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/ConfigExecution.java @@ -166,28 +166,30 @@ public class ConfigExecution implements IQueryExecution { if (cause instanceof IoTDBException) { if (Objects.nonNull(((IoTDBException) cause).getStatus())) { status = ((IoTDBException) cause).getStatus(); + errorCode = status.getCode(); } else { errorCode = ((IoTDBException) cause).getErrorCode(); } } else if (cause instanceof IoTDBRuntimeException) { if (Objects.nonNull(((IoTDBRuntimeException) cause).getStatus())) { status = ((IoTDBRuntimeException) cause).getStatus(); + errorCode = status.getCode(); } else { errorCode = ((IoTDBRuntimeException) cause).getErrorCode(); } } - if (Objects.nonNull(status) && isUserException(status) - || !userExceptionCodes.contains(errorCode)) { - LOGGER.warn( - "Failures happened during running ConfigExecution when executing {}.", - Objects.nonNull(task) ? task.getClass().getSimpleName() : null, - cause); - } else { + if ((Objects.nonNull(status) && isUserException(status)) + || userExceptionCodes.contains(errorCode)) { LOGGER.info( "Failures happened during running ConfigExecution when executing {}, message: {}, status: {}", Objects.nonNull(task) ? task.getClass().getSimpleName() : null, cause.getMessage(), errorCode); + } else { + LOGGER.warn( + "Failures happened during running ConfigExecution when executing {}.", + Objects.nonNull(task) ? task.getClass().getSimpleName() : null, + cause); } stateMachine.transitionToFailed(cause); final ConfigTaskResult result;
