Skip to content

Commit

Permalink
[region migration] Fix exception capture processing logic apache#13034
Browse files Browse the repository at this point in the history
  • Loading branch information
HxpSerein authored and pull[bot] committed Dec 16, 2024
1 parent 56c943b commit 2b3c511
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ public RegionExecutionResult execute(
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()));
Expand All @@ -104,9 +110,6 @@ public RegionExecutionResult execute(
|| 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;
}
Expand Down

0 comments on commit 2b3c511

Please sign in to comment.