Skip to content

Commit 2b3c511

Browse files
HxpSereinpull[bot]
authored andcommitted
[region migration] Fix exception capture processing logic #13034
1 parent 56c943b commit 2b3c511

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionReadExecutor.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ public RegionExecutionResult execute(
9494
resp.setMessage(info.getMessage());
9595
}
9696
return resp;
97+
} catch (ConsensusGroupNotExistException e) {
98+
LOGGER.error("Execute FragmentInstance in ConsensusGroup {} failed.", groupId, e);
99+
resp.setMessage(String.format(ERROR_MSG_FORMAT, e.getMessage()));
100+
resp.setNeedRetry(true);
101+
resp.setStatus(new TSStatus(TSStatusCode.CONSENSUS_GROUP_NOT_EXIST.getStatusCode()));
102+
return resp;
97103
} catch (Throwable e) {
98104
LOGGER.error("Execute FragmentInstance in ConsensusGroup {} failed.", groupId, e);
99105
resp.setMessage(String.format(ERROR_MSG_FORMAT, e.getMessage()));
@@ -104,9 +110,6 @@ public RegionExecutionResult execute(
104110
|| t instanceof ServerNotReadyException) {
105111
resp.setNeedRetry(true);
106112
resp.setStatus(new TSStatus(TSStatusCode.RATIS_READ_UNAVAILABLE.getStatusCode()));
107-
} else if (t instanceof ConsensusGroupNotExistException) {
108-
resp.setNeedRetry(true);
109-
resp.setStatus(new TSStatus(TSStatusCode.CONSENSUS_GROUP_NOT_EXIST.getStatusCode()));
110113
}
111114
return resp;
112115
}

0 commit comments

Comments
 (0)