diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java index 63e4a2588c8d..4a293fb3fd4f 100644 --- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java +++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/RatisConsensus.java @@ -332,6 +332,8 @@ && waitUntilLeaderReady(raftGroupId)) { if (ex != null) { suggestedLeader = ex.getSuggestedLeader(); } + } catch (GroupMismatchException e) { + throw new ConsensusGroupNotExistException(groupId); } catch (Exception e) { throw new RatisRequestFailedException(e); } @@ -347,6 +349,8 @@ && waitUntilLeaderReady(raftGroupId)) { throw new RatisRequestFailedException(reply.getException()); } writeResult = Utils.deserializeFrom(reply.getMessage().getContent().asReadOnlyByteBuffer()); + } catch (GroupMismatchException e) { + throw new ConsensusGroupNotExistException(groupId); } catch (Exception e) { throw new RatisRequestFailedException(e); }