This is an automated email from the ASF dual-hosted git repository. jackietien pushed a commit to branch ty/TableModelGrammar in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 8ce699db53a8980592bbd90aeb1d2b55964225aa Author: Xiangpeng Hu <[email protected]> AuthorDate: Fri Jul 26 10:46:01 2024 +0800 [region migration] Fix exception capture processing logic #13034 (cherry picked from commit 872aca3138d2316c8ea6e31cf8f97e35664a05a6) --- .../db/queryengine/execution/executor/RegionReadExecutor.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 016c3ed21fb..3b6a0f0adb0 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 @@ -94,6 +94,12 @@ public class RegionReadExecutor { resp.setMessage(info.getMessage()); } return resp; + } catch (ConsensusGroupNotExistException e) { + LOGGER.error("Execute FragmentInstance in ConsensusGroup {} failed.", groupId, e); + resp.setMessage(String.format(ERROR_MSG_FORMAT, e.getMessage())); + resp.setNeedRetry(true); + resp.setStatus(new TSStatus(TSStatusCode.CONSENSUS_GROUP_NOT_EXIST.getStatusCode())); + return resp; } catch (Throwable e) { LOGGER.error("Execute FragmentInstance in ConsensusGroup {} failed.", groupId, e); resp.setMessage(String.format(ERROR_MSG_FORMAT, e.getMessage())); @@ -104,9 +110,6 @@ public class RegionReadExecutor { || t instanceof ServerNotReadyException) { resp.setNeedRetry(true); resp.setStatus(new TSStatus(TSStatusCode.RATIS_READ_UNAVAILABLE.getStatusCode())); - } else if (t instanceof ConsensusGroupNotExistException) { - resp.setNeedRetry(true); - resp.setStatus(new TSStatus(TSStatusCode.CONSENSUS_GROUP_NOT_EXIST.getStatusCode())); } return resp; }
