This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dev/1.3 by this push:
new 90f65189f6a [To dev/1.3] Fixed the null error message of fetch schema
failed when the regions is removing (#16713) (#16718)
90f65189f6a is described below
commit 90f65189f6a0bafd56a394f6a5c21be2b7f9b3fa
Author: Caideyipi <[email protected]>
AuthorDate: Mon Nov 10 14:11:56 2025 +0800
[To dev/1.3] Fixed the null error message of fetch schema failed when the
regions is removing (#16713) (#16718)
* Fixed the null error message of fetch schema failed when the regions is
removing (#16713)
* cm
---
.../db/queryengine/execution/executor/RegionReadExecutor.java | 10 ++++++----
.../plan/analyze/schema/ClusterSchemaFetchExecutor.java | 9 ++++-----
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionReadExecutor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionReadExecutor.java
index b045babc6d6..cc00f094cfc 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionReadExecutor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionReadExecutor.java
@@ -100,13 +100,15 @@ public class RegionReadExecutor {
});
return resp;
}
- } catch (ConsensusGroupNotExistException e) {
+ } catch (final ConsensusGroupNotExistException e) {
LOGGER.warn("Execute FragmentInstance in ConsensusGroup {} failed.",
groupId, e);
- RegionExecutionResult resp =
+ final String errorMsg = String.format(ERROR_MSG_FORMAT, e.getMessage());
+ final RegionExecutionResult resp =
RegionExecutionResult.create(
false,
- String.format(ERROR_MSG_FORMAT, e.getMessage()),
- new
TSStatus(TSStatusCode.CONSENSUS_GROUP_NOT_EXIST.getStatusCode()));
+ errorMsg,
+ new
TSStatus(TSStatusCode.CONSENSUS_GROUP_NOT_EXIST.getStatusCode())
+ .setMessage(errorMsg));
resp.setReadNeedRetry(true);
return resp;
} catch (Throwable e) {
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 d302482c523..bcea21a666e 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
@@ -21,6 +21,7 @@ package org.apache.iotdb.db.queryengine.plan.analyze.schema;
import org.apache.iotdb.commons.exception.IllegalPathException;
import org.apache.iotdb.commons.exception.IoTDBException;
+import org.apache.iotdb.commons.exception.IoTDBRuntimeException;
import org.apache.iotdb.commons.exception.MetadataException;
import org.apache.iotdb.commons.path.PartialPath;
import org.apache.iotdb.commons.path.PathPatternTree;
@@ -245,11 +246,9 @@ class ClusterSchemaFetchExecutor {
try {
ExecutionResult executionResult = executionStatement(queryId,
fetchStatement, context);
if (executionResult.status.getCode() !=
TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
- throw new RuntimeException(
- new IoTDBException(
- String.format(
- "Fetch Schema failed, because %s",
executionResult.status.getMessage()),
- executionResult.status.getCode()));
+ throw new IoTDBRuntimeException(
+ 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();