OneSizeFitsQuorum commented on code in PR #13001:
URL: https://github.com/apache/iotdb/pull/13001#discussion_r1689477648


##########
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java:
##########
@@ -264,6 +264,10 @@ public enum TSStatusCode {
   PIPE_CONSENSUS_TRANSFER_FILE_OFFSET_RESET(2203),
   PIPE_CONSENSUS_TRANSFER_FILE_ERROR(2204),
   PIPE_CONSENSUS_TYPE_ERROR(2205),
+
+  // Consensus Exception
+  CONSENSUS_GROUP_NOT_EXIST(2300),

Review Comment:
   How about merging the status codes of the PipeConsensus above and making 
them all Consensus Exceptions?



##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/executor/RegionReadExecutor.java:
##########
@@ -100,6 +103,10 @@ public RegionExecutionResult execute(
           || t instanceof NotLeaderException
           || 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()));

Review Comment:
   Is it necessary to add these status codes just for retry purposes? Seems to 
print a log + set the retry flag is ok?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to