This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch ty/AllowRetry
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/ty/AllowRetry by this push:
new b6d06146d4c rethrow IoTDBException using RuntimeException as wrapper
in schema fetch
b6d06146d4c is described below
commit b6d06146d4c8a58bed7e4dfdae06a5deeb0194f2
Author: JackieTien97 <[email protected]>
AuthorDate: Tue Aug 13 15:05:26 2024 +0800
rethrow IoTDBException using RuntimeException as wrapper in schema fetch
---
.../plan/analyze/schema/ClusterSchemaFetchExecutor.java | 7 ++++---
.../main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java | 3 ++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java
index 8d511abde70..ed9f9b80f58 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java
@@ -245,9 +245,10 @@ class ClusterSchemaFetchExecutor {
ExecutionResult executionResult = executionStatement(queryId,
fetchStatement, context);
if (executionResult.status.getCode() !=
TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
throw new RuntimeException(
- String.format(
- "cannot fetch schema, status is: %s, msg is: %s",
- executionResult.status.getCode(),
executionResult.status.getMessage()));
+ new IoTDBException(
+ String.format(
+ "Fetch Schema failed, because %s",
executionResult.status.getMessage()),
+ executionResult.status.getCode()));
}
try (SetThreadName threadName = new
SetThreadName(executionResult.queryId.getId())) {
ClusterSchemaTree result = new ClusterSchemaTree();
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
index eff6bbf3a6a..2ac49494acd 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
@@ -101,7 +101,8 @@ public class ErrorHandlingUtils {
status.getCode(), operation, status.getMessage());
if (status.getCode() == TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
|| status.getCode() == TSStatusCode.SEMANTIC_ERROR.getStatusCode()
- || status.getCode() == TSStatusCode.NO_PERMISSION.getStatusCode())
{
+ || status.getCode() == TSStatusCode.NO_PERMISSION.getStatusCode()
+ || status.getCode() == TSStatusCode.ILLEGAL_PATH.getStatusCode()) {
LOGGER.warn(message);
} else {
LOGGER.warn(message, e);