You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2022/11/17 05:43:10 UTC

[iotdb] 01/01: adjust error code

This is an automated email from the ASF dual-hosted git repository.

qiaojialin pushed a commit to branch adjust_error_code
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit b0053f7e54b2e231946aadaa7e452cd06aa7e0da
Author: qiaojialin <64...@qq.com>
AuthorDate: Thu Nov 17 13:42:53 2022 +0800

    adjust error code
---
 .../client/sync/SyncConfigNodeClientPool.java      |   5 +-
 .../client/sync/SyncDataNodeClientPool.java        |   6 +-
 ...n.java => NoAvailableRegionGroupException.java} |   4 +-
 .../confignode/manager/ClusterSchemaManager.java   |   2 +-
 .../iotdb/confignode/manager/ConfigManager.java    |   2 +-
 .../iotdb/confignode/manager/ConsensusManager.java |   2 +-
 .../iotdb/confignode/manager/ProcedureManager.java |   2 +-
 .../iotdb/confignode/manager/load/LoadManager.java |   6 +-
 .../manager/load/balancer/PartitionBalancer.java   |   6 +-
 .../partition/GreedyPartitionAllocator.java        |   6 +-
 .../balancer/partition/IPartitionAllocator.java    |   6 +-
 .../iotdb/confignode/manager/node/NodeManager.java |   6 +-
 .../manager/partition/PartitionManager.java        |  18 +-
 .../iotdb/confignode/persistence/AuthorInfo.java   |   4 +-
 .../iotdb/confignode/service/ConfigNode.java       |   4 +-
 .../multileader/MultiLeaderConsensus.java          |   2 +-
 .../multileader/client/DispatchLogHandler.java     |   2 +-
 .../service/MultiLeaderRPCServiceProcessor.java    |   2 +-
 .../iotdb/consensus/simple/SimpleConsensus.java    |   2 +-
 docs/UserGuide/API/Status-Codes.md                 | 149 +++++------
 docs/zh/UserGuide/API/Status-Codes.md              | 152 ++++++------
 .../iotdb/session/it/IoTDBSessionSimpleIT.java     |  26 +-
 .../java/org/apache/iotdb/jdbc/IoTDBStatement.java |   4 +-
 .../commons/exception/IllegalPathException.java    |   4 +-
 .../apache/iotdb/commons/utils/StatusUtils.java    |  17 +-
 .../iotdb/db/auth/StandaloneAuthorityFetcher.java  |   2 +-
 .../apache/iotdb/db/client/ConfigNodeClient.java   |   2 +-
 .../apache/iotdb/db/engine/StorageEngineV2.java    |   8 +-
 .../db/exception/ContinuousQueryException.java     |  36 ---
 .../iotdb/db/exception/DataRegionException.java    |   4 +-
 .../exception/StorageEngineReadonlyException.java  |   2 +-
 .../iotdb/db/exception/SystemCheckException.java   |  34 ---
 .../index/UnsupportedIndexTypeException.java       |  32 ---
 .../exception/metadata/DeleteFailedException.java  |  40 ---
 .../apache/iotdb/db/index/common/IndexType.java    |  10 +-
 .../schemaregion/SchemaRegionMemoryImpl.java       |  16 +-
 .../schemaregion/SchemaRegionSchemaFileImpl.java   |  16 +-
 .../operator/process/AbstractIntoOperator.java     |   2 +-
 .../db/mpp/plan/execution/QueryExecution.java      |   5 +-
 .../config/executor/ClusterConfigTaskExecutor.java |  12 +-
 .../db/mpp/plan/planner/LocalExecutionPlanner.java |   2 +-
 .../db/mpp/plan/scheduler/StandaloneScheduler.java |   2 +-
 .../protocol/rest/filter/AuthorizationFilter.java  |   4 +-
 .../protocol/rest/impl/GrafanaApiServiceImpl.java  |   6 +-
 .../db/protocol/rest/impl/RestApiServiceImpl.java  |   6 +-
 .../iotdb/db/query/control/SessionManager.java     |   2 +-
 .../service/thrift/impl/ClientRPCServiceImpl.java  |   4 +-
 .../impl/DataNodeInternalRPCServiceImpl.java       |   6 +-
 .../service/thrift/impl/DataNodeRegionManager.java |   2 +-
 .../db/service/thrift/impl/TSServiceImpl.java      |   2 +-
 .../java/org/apache/iotdb/db/tools/WalChecker.java |  10 +-
 .../apache/iotdb/db/utils/ErrorHandlingUtils.java  |   8 +-
 .../iotdb/db/wal/exception/WALException.java       |   6 +-
 .../org/apache/iotdb/db/tools/WalCheckerTest.java  |  12 +-
 .../main/java/org/apache/iotdb/rpc/RpcUtils.java   |   8 +-
 .../java/org/apache/iotdb/rpc/TSStatusCode.java    | 271 +++++++++++----------
 56 files changed, 438 insertions(+), 573 deletions(-)

diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java b/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java
index 99fe08b702..e7e322e1f6 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java
@@ -102,7 +102,8 @@ public class SyncConfigNodeClientPool {
     }
     LOGGER.error("{} failed on ConfigNode {}", requestType, endPoint, lastException);
     return RpcUtils.getStatus(
-        TSStatusCode.ALL_RETRY_ERROR, "All retry failed due to: " + lastException.getMessage());
+        TSStatusCode.INTERNAL_REQUEST_RETRY_ERROR,
+        "All retry failed due to: " + lastException.getMessage());
   }
 
   /**
@@ -115,7 +116,7 @@ public class SyncConfigNodeClientPool {
       TConfigNodeLocation configNodeLocation, SyncConfigNodeIServiceClient client)
       throws TException, IOException, InterruptedException {
     TSStatus status = client.removeConfigNode(configNodeLocation);
-    while (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+    while (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       TimeUnit.MILLISECONDS.sleep(2000);
       updateConfigNodeLeader(status);
       try (SyncConfigNodeIServiceClient clientLeader =
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java b/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java
index 5d5c5c6bb1..ec2de81350 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java
@@ -81,7 +81,7 @@ public class SyncDataNodeClientPool {
       }
     }
     LOGGER.error("{} failed on DataNode {}", requestType, endPoint, lastException);
-    return new TSStatus(TSStatusCode.ALL_RETRY_ERROR.getStatusCode())
+    return new TSStatus(TSStatusCode.INTERNAL_REQUEST_RETRY_ERROR.getStatusCode())
         .setMessage("All retry failed due to: " + lastException.getMessage());
   }
 
@@ -105,7 +105,7 @@ public class SyncDataNodeClientPool {
       }
     }
     LOGGER.error("{} failed on DataNode {}", requestType, endPoint, lastException);
-    return new TSStatus(TSStatusCode.ALL_RETRY_ERROR.getStatusCode())
+    return new TSStatus(TSStatusCode.INTERNAL_REQUEST_RETRY_ERROR.getStatusCode())
         .setMessage("All retry failed due to: " + lastException.getMessage());
   }
 
@@ -179,7 +179,7 @@ public class SyncDataNodeClientPool {
       status = client.changeRegionLeader(req);
     } catch (IOException e) {
       LOGGER.error("Can't connect to Data node: {}", dataNode, e);
-      status = new TSStatus(TSStatusCode.NO_CONNECTION.getStatusCode());
+      status = new TSStatus(TSStatusCode.CAN_NOT_CONNECT_DATANODE.getStatusCode());
       status.setMessage(e.getMessage());
     } catch (TException e) {
       LOGGER.error("Change regions leader error on Date node: {}", dataNode, e);
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/exception/NotAvailableRegionGroupException.java b/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
similarity index 88%
rename from confignode/src/main/java/org/apache/iotdb/confignode/exception/NotAvailableRegionGroupException.java
rename to confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
index a9687a804f..294c06d390 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/exception/NotAvailableRegionGroupException.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
@@ -18,9 +18,9 @@
  */
 package org.apache.iotdb.confignode.exception;
 
-public class NotAvailableRegionGroupException extends ConfigNodeException {
+public class NoAvailableRegionGroupException extends ConfigNodeException {
 
-  public NotAvailableRegionGroupException() {
+  public NoAvailableRegionGroupException() {
     super(
         "There are no available RegionGroups currently, please check the status of cluster DataNodes");
   }
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterSchemaManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterSchemaManager.java
index 008bb69b11..2566317627 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterSchemaManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterSchemaManager.java
@@ -123,7 +123,7 @@ public class ClusterSchemaManager {
     } catch (MetadataException metadataException) {
       // Reject if StorageGroup already set
       if (metadataException instanceof IllegalPathException) {
-        result = new TSStatus(TSStatusCode.PATH_ILLEGAL.getStatusCode());
+        result = new TSStatus(TSStatusCode.ILLEGAL_PATH.getStatusCode());
       } else {
         result = new TSStatus(TSStatusCode.DATABASE_ALREADY_EXISTS.getStatusCode());
       }
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
index 747a5c00f2..178ec1be95 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
@@ -736,7 +736,7 @@ public class ConfigManager implements IManager {
     final String errorSuffix = " is consistent with the Seed-ConfigNode.";
 
     ConfigNodeConfig conf = ConfigNodeDescriptor.getInstance().getConf();
-    TSStatus errorStatus = new TSStatus(TSStatusCode.ERROR_GLOBAL_CONFIG.getStatusCode());
+    TSStatus errorStatus = new TSStatus(TSStatusCode.CONFIGURATION_ERROR.getStatusCode());
     if (!req.getDataRegionConsensusProtocolClass()
         .equals(conf.getDataRegionConsensusProtocolClass())) {
       return errorStatus.setMessage(
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
index 446d745b20..3de783f000 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
@@ -328,7 +328,7 @@ public class ConsensusManager {
     if (isLeader()) {
       return result.setCode(TSStatusCode.SUCCESS_STATUS.getStatusCode());
     } else {
-      result.setCode(TSStatusCode.NEED_REDIRECTION.getStatusCode());
+      result.setCode(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode());
       result.setMessage(
           "The current ConfigNode is not leader, please redirect to a new ConfigNode.");
 
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java
index 79ecc64828..9e42c753c0 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java
@@ -501,7 +501,7 @@ public class ProcedureManager {
           executor.getResultOrProcedure(procedureId);
       if (!finishedProcedure.isFinished()) {
         // the procedure is still executing
-        statusList.add(RpcUtils.getStatus(TSStatusCode.STILL_EXECUTING_STATUS));
+        statusList.add(RpcUtils.getStatus(TSStatusCode.OVERLAP_WITH_EXISTING_TASK));
         isSucceed = false;
         continue;
       }
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManager.java
index ed8564617c..b16692e8db 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManager.java
@@ -37,7 +37,7 @@ import org.apache.iotdb.confignode.client.async.handlers.AsyncClientHandler;
 import org.apache.iotdb.confignode.conf.ConfigNodeConfig;
 import org.apache.iotdb.confignode.conf.ConfigNodeDescriptor;
 import org.apache.iotdb.confignode.consensus.request.write.region.CreateRegionGroupsPlan;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 import org.apache.iotdb.confignode.exception.NotEnoughDataNodeException;
 import org.apache.iotdb.confignode.exception.StorageGroupNotExistsException;
 import org.apache.iotdb.confignode.manager.ClusterSchemaManager;
@@ -123,7 +123,7 @@ public class LoadManager {
    */
   public Map<String, SchemaPartitionTable> allocateSchemaPartition(
       Map<String, List<TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     return partitionBalancer.allocateSchemaPartition(unassignedSchemaPartitionSlotsMap);
   }
 
@@ -136,7 +136,7 @@ public class LoadManager {
   public Map<String, DataPartitionTable> allocateDataPartition(
       Map<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>>
           unassignedDataPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     return partitionBalancer.allocateDataPartition(unassignedDataPartitionSlotsMap);
   }
 
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/PartitionBalancer.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/PartitionBalancer.java
index f51b0db187..72522e099b 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/PartitionBalancer.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/PartitionBalancer.java
@@ -22,7 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot;
 import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot;
 import org.apache.iotdb.commons.partition.DataPartitionTable;
 import org.apache.iotdb.commons.partition.SchemaPartitionTable;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 import org.apache.iotdb.confignode.manager.IManager;
 import org.apache.iotdb.confignode.manager.load.balancer.partition.GreedyPartitionAllocator;
 import org.apache.iotdb.confignode.manager.load.balancer.partition.IPartitionAllocator;
@@ -50,7 +50,7 @@ public class PartitionBalancer {
    */
   public Map<String, SchemaPartitionTable> allocateSchemaPartition(
       Map<String, List<TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     return genPartitionAllocator().allocateSchemaPartition(unassignedSchemaPartitionSlotsMap);
   }
 
@@ -63,7 +63,7 @@ public class PartitionBalancer {
   public Map<String, DataPartitionTable> allocateDataPartition(
       Map<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>>
           unassignedDataPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     return genPartitionAllocator().allocateDataPartition(unassignedDataPartitionSlotsMap);
   }
 
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/GreedyPartitionAllocator.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/GreedyPartitionAllocator.java
index 73b5263318..99350f431e 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/GreedyPartitionAllocator.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/GreedyPartitionAllocator.java
@@ -26,7 +26,7 @@ import org.apache.iotdb.commons.partition.DataPartitionTable;
 import org.apache.iotdb.commons.partition.SchemaPartitionTable;
 import org.apache.iotdb.commons.partition.SeriesPartitionTable;
 import org.apache.iotdb.confignode.conf.ConfigNodeDescriptor;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 import org.apache.iotdb.confignode.manager.IManager;
 import org.apache.iotdb.confignode.manager.partition.PartitionManager;
 import org.apache.iotdb.tsfile.utils.Pair;
@@ -52,7 +52,7 @@ public class GreedyPartitionAllocator implements IPartitionAllocator {
   @Override
   public Map<String, SchemaPartitionTable> allocateSchemaPartition(
       Map<String, List<TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     Map<String, SchemaPartitionTable> result = new ConcurrentHashMap<>();
 
     for (Map.Entry<String, List<TSeriesPartitionSlot>> slotsMapEntry :
@@ -83,7 +83,7 @@ public class GreedyPartitionAllocator implements IPartitionAllocator {
   public Map<String, DataPartitionTable> allocateDataPartition(
       Map<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>>
           unassignedDataPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     Map<String, DataPartitionTable> result = new ConcurrentHashMap<>();
 
     for (Map.Entry<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>> slotsMapEntry :
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/IPartitionAllocator.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/IPartitionAllocator.java
index f957c0b8db..ec20638d3e 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/IPartitionAllocator.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/IPartitionAllocator.java
@@ -22,7 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot;
 import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot;
 import org.apache.iotdb.commons.partition.DataPartitionTable;
 import org.apache.iotdb.commons.partition.SchemaPartitionTable;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 
 import java.util.List;
 import java.util.Map;
@@ -41,7 +41,7 @@ public interface IPartitionAllocator {
    */
   Map<String, SchemaPartitionTable> allocateSchemaPartition(
       Map<String, List<TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
-      throws NotAvailableRegionGroupException;
+      throws NoAvailableRegionGroupException;
 
   /**
    * Allocate DataPartitions
@@ -52,5 +52,5 @@ public interface IPartitionAllocator {
   Map<String, DataPartitionTable> allocateDataPartition(
       Map<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>>
           unassignedDataPartitionSlotsMap)
-      throws NotAvailableRegionGroupException;
+      throws NoAvailableRegionGroupException;
 }
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java
index 86e743437b..8238594756 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java
@@ -290,7 +290,7 @@ public class NodeManager {
     if (configManager.transfer(removeDataNodePlan.getDataNodeLocations()).getCode()
         != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
       dataSet.setStatus(
-          new TSStatus(TSStatusCode.NODE_DELETE_ERROR.getStatusCode())
+          new TSStatus(TSStatusCode.REMOVE_DATANODE_ERROR.getStatusCode())
               .setMessage("Fail to do transfer of the DataNodes"));
       return dataSet;
     }
@@ -303,7 +303,7 @@ public class NodeManager {
       status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
       status.setMessage("Server accepted the request");
     } else {
-      status = new TSStatus(TSStatusCode.NODE_DELETE_ERROR.getStatusCode());
+      status = new TSStatus(TSStatusCode.REMOVE_DATANODE_ERROR.getStatusCode());
       status.setMessage("Server rejected the request, maybe requests are too many");
     }
     dataSet.setStatus(status);
@@ -612,7 +612,7 @@ public class NodeManager {
       return new TSStatus(TSStatusCode.REMOVE_CONFIGNODE_ERROR.getStatusCode())
           .setMessage("Remove ConfigNode failed because transfer ConfigNode leader failed.");
     }
-    return new TSStatus(TSStatusCode.NEED_REDIRECTION.getStatusCode())
+    return new TSStatus(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode())
         .setRedirectNode(newLeader.getInternalEndPoint())
         .setMessage(
             "The ConfigNode to be removed is leader, already transfer Leader to "
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
index 817091fbfe..2528fe5af5 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
@@ -59,7 +59,7 @@ import org.apache.iotdb.confignode.consensus.response.GetTimeSlotListResp;
 import org.apache.iotdb.confignode.consensus.response.RegionInfoListResp;
 import org.apache.iotdb.confignode.consensus.response.SchemaNodeManagementResp;
 import org.apache.iotdb.confignode.consensus.response.SchemaPartitionResp;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 import org.apache.iotdb.confignode.exception.NotEnoughDataNodeException;
 import org.apache.iotdb.confignode.exception.StorageGroupNotExistsException;
 import org.apache.iotdb.confignode.manager.ClusterSchemaManager;
@@ -217,10 +217,10 @@ public class PartitionManager {
         try {
           assignedSchemaPartition =
               getLoadManager().allocateSchemaPartition(unassignedSchemaPartitionSlotsMap);
-        } catch (NotAvailableRegionGroupException e) {
+        } catch (NoAvailableRegionGroupException e) {
           LOGGER.error(e.getMessage());
           resp.setStatus(
-              new TSStatus(TSStatusCode.NOT_AVAILABLE_REGION_GROUP.getStatusCode())
+              new TSStatus(TSStatusCode.NO_AVAILABLE_REGION_GROUP.getStatusCode())
                   .setMessage(e.getMessage()));
           return resp;
         }
@@ -294,10 +294,10 @@ public class PartitionManager {
         try {
           assignedDataPartition =
               getLoadManager().allocateDataPartition(unassignedDataPartitionSlotsMap);
-        } catch (NotAvailableRegionGroupException e) {
+        } catch (NoAvailableRegionGroupException e) {
           LOGGER.error(e.getMessage());
           resp.setStatus(
-              new TSStatus(TSStatusCode.NOT_AVAILABLE_REGION_GROUP.getStatusCode())
+              new TSStatus(TSStatusCode.NO_AVAILABLE_REGION_GROUP.getStatusCode())
                   .setMessage(e.getMessage()));
           return resp;
         }
@@ -501,11 +501,11 @@ public class PartitionManager {
    * @param storageGroup StorageGroupName
    * @param type SchemaRegion or DataRegion
    * @return The specific StorageGroup's Regions that sorted by the number of allocated slots
-   * @throws NotAvailableRegionGroupException When all RegionGroups within the specified
-   *     StorageGroup are unavailable currently
+   * @throws NoAvailableRegionGroupException When all RegionGroups within the specified StorageGroup
+   *     are unavailable currently
    */
   public List<Pair<Long, TConsensusGroupId>> getSortedRegionGroupSlotsCounter(
-      String storageGroup, TConsensusGroupType type) throws NotAvailableRegionGroupException {
+      String storageGroup, TConsensusGroupType type) throws NoAvailableRegionGroupException {
     // Collect static data
     List<Pair<Long, TConsensusGroupId>> regionGroupSlotsCounter =
         partitionInfo.getRegionGroupSlotsCounter(storageGroup, type);
@@ -521,7 +521,7 @@ public class PartitionManager {
     }
 
     if (result.isEmpty()) {
-      throw new NotAvailableRegionGroupException();
+      throw new NoAvailableRegionGroupException();
     }
 
     result.sort(Comparator.comparingLong(Pair::getLeft));
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/AuthorInfo.java b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/AuthorInfo.java
index 8f3eb1b1f0..3941943aad 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/AuthorInfo.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/AuthorInfo.java
@@ -118,7 +118,7 @@ public class AuthorInfo implements SnapshotProcessor {
         result = getUserPermissionInfo(username);
         result.setStatus(RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS));
       } catch (AuthException e) {
-        result.setStatus(RpcUtils.getStatus(TSStatusCode.EXECUTE_PERMISSION_ERROR, e.getMessage()));
+        result.setStatus(RpcUtils.getStatus(TSStatusCode.AUTHENTICATION_ERROR, e.getMessage()));
       }
     } else {
       result = AuthUtils.generateEmptyPermissionInfoResp();
@@ -202,7 +202,7 @@ public class AuthorInfo implements SnapshotProcessor {
           throw new AuthException("unknown type: " + authorPlan.getAuthorType());
       }
     } catch (AuthException e) {
-      return RpcUtils.getStatus(TSStatusCode.EXECUTE_PERMISSION_ERROR, e.getMessage());
+      return RpcUtils.getStatus(TSStatusCode.AUTHENTICATION_ERROR, e.getMessage());
     }
     return RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS);
   }
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java b/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
index 363c092d77..ba92491931 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
@@ -260,10 +260,10 @@ public class ConfigNode implements ConfigNodeMBean {
         CONF.setConfigNodeId(resp.getConfigNodeId());
         configManager.initConsensusManager();
         return;
-      } else if (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+      } else if (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         targetConfigNode = status.getRedirectNode();
         LOGGER.info("ConfigNode need redirect to  {}.", targetConfigNode);
-      } else if (status.getCode() == TSStatusCode.ERROR_GLOBAL_CONFIG.getStatusCode()) {
+      } else if (status.getCode() == TSStatusCode.CONFIGURATION_ERROR.getStatusCode()) {
         LOGGER.error(status.getMessage());
         throw new StartupException("Configuration are not consistent!");
       } else if (status.getCode() == TSStatusCode.CONSENSUS_NOT_INITIALIZED.getStatusCode()) {
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensus.java b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensus.java
index 91d3134b55..fab6ed0057 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensus.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensus.java
@@ -159,7 +159,7 @@ public class MultiLeaderConsensus implements IConsensus {
 
     TSStatus status;
     if (impl.isReadOnly()) {
-      status = new TSStatus(TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+      status = new TSStatus(TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
       status.setMessage("Fail to do non-query operations because system is read-only.");
     } else if (!impl.isActive()) {
       // TODO: (xingtanzjr) whether we need to define a new status to indicate the inactive status ?
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/client/DispatchLogHandler.java b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/client/DispatchLogHandler.java
index 0c5ef42e1b..e552acafe2 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/client/DispatchLogHandler.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/client/DispatchLogHandler.java
@@ -79,7 +79,7 @@ public class DispatchLogHandler implements AsyncMethodCallback<TSyncLogRes> {
 
   private boolean needRetry(int statusCode) {
     return statusCode == TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
-        || statusCode == TSStatusCode.READ_ONLY_SYSTEM.getStatusCode()
+        || statusCode == TSStatusCode.SYSTEM_READ_ONLY.getStatusCode()
         || statusCode == TSStatusCode.WRITE_PROCESS_REJECT.getStatusCode();
   }
 
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/service/MultiLeaderRPCServiceProcessor.java b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/service/MultiLeaderRPCServiceProcessor.java
index fc3bdf123b..744a1d1463 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/service/MultiLeaderRPCServiceProcessor.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/service/MultiLeaderRPCServiceProcessor.java
@@ -90,7 +90,7 @@ public class MultiLeaderRPCServiceProcessor implements MultiLeaderConsensusIServ
       if (impl.isReadOnly()) {
         String message = "fail to sync log because system is read-only.";
         logger.error(message);
-        TSStatus status = new TSStatus(TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+        TSStatus status = new TSStatus(TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
         status.setMessage(message);
         resultHandler.onComplete(new TSyncLogRes(Collections.singletonList(status)));
         return;
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/simple/SimpleConsensus.java b/consensus/src/main/java/org/apache/iotdb/consensus/simple/SimpleConsensus.java
index beb5c21dae..0a112d1bbf 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/simple/SimpleConsensus.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/simple/SimpleConsensus.java
@@ -118,7 +118,7 @@ class SimpleConsensus implements IConsensus {
 
     TSStatus status;
     if (impl.isReadOnly()) {
-      status = new TSStatus(TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+      status = new TSStatus(TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
       status.setMessage("Fail to do non-query operations because system is read-only.");
     } else {
       status = impl.write(request);
diff --git a/docs/UserGuide/API/Status-Codes.md b/docs/UserGuide/API/Status-Codes.md
index dca83e8474..a3e824882c 100644
--- a/docs/UserGuide/API/Status-Codes.md
+++ b/docs/UserGuide/API/Status-Codes.md
@@ -45,29 +45,37 @@ Here is a list of Status Code and related message:
 |Status Code|Status Type|Meanings|
 |:--|:---|:---|
 |200|SUCCESS_STATUS||
-|201|STILL_EXECUTING_STATUS||
+
 |203|INCOMPATIBLE_VERSION|Incompatible version|
-|298|NODE_DELETE_ERROR|Failed while deleting node|
+|800|CONFIGURATION_ERROR|Configuration error|
+|504|START_UP_ERROR|Meet error while starting|
+|505|SHUT_DOWN_ERROR|Meet error while shutdown|
+
+
+|703|UNSUPPORTED_OPERATION|Unsupported operation|
+|400|EXECUTE_STATEMENT_ERROR|Execute statement error|
+|506|MULTIPLE_ERROR|Meet error when executing multiple statements|
+|318|ILLEGAL_PARAMETER|Parameter is illegal|
+|920|OVERLAP_WITH_EXISTING_TASK|Current task has some conflict with existing tasks|
+|500|INTERNAL_SERVER_ERROR|Internal server error|
+
+
+|707|REDIRECTION_RECOMMEND|Recommend Client redirection|
+
+
+|322|DATABASE_NOT_EXIST|Database does not exist|
+|903|DATABASE_ALREADY_EXISTS|Database already exist|
+|337|SERIES_OVERFLOW|Series number exceeds the threshold|
+|338|TIMESERIES_ALREADY_EXIST|Timeseries number exceeds the threshold|
+|344|TIMESERIES_IN_BLACK_LIST|Timeseries is being deleted|
 |299|ALIAS_ALREADY_EXIST|Alias already exists|
 |300|PATH_ALREADY_EXIST|Path already exists|
 |303|METADATA_ERROR|Meet error when dealing with metadata|
 |304|PATH_NOT_EXIST|Path does not exist|
-|305|OUT_OF_TTL|Insertion time is less than TTL time bound|
-|307|COMPACTION_ERROR|Meet error while merging|
-|308|SYSTEM_CHECK_ERROR|Meet error while system checking|
-|310|SYNC_CONNECTION_ERROR|Meet error while sync connecting|
-|311|DATABASE_PROCESS_ERROR|Database processor related error|
-|313|STORAGE_ENGINE_ERROR|Storage engine related error|
-|314|TSFILE_PROCESSOR_ERROR|TsFile processor related error|
-|315|PATH_ILLEGAL|Illegal path|
-|316|LOAD_FILE_ERROR|Meet error while loading file|
-|317|DATABASE_NOT_READY|The database is in recovery mode, not ready fore accepting read/write operation|
-|318|ILLEGAL_PARAMETER|Parameter is illegal|
-|319|ALIGNED_TIMESERIES_ERROR|Meet error in aligned timeseries|
+|315|ILLEGAL_PATH|Illegal path|
+|340|CREATE_TEMPLATE_ERROR|Create schema template error|
 |320|DUPLICATED_TEMPLATE|Schema template is duplicated|
 |321|UNDEFINED_TEMPLATE|Schema template is not defined|
-|322|DATABASE_NOT_EXIST|Database does not exist|
-|323|CONTINUOUS_QUERY_ERROR|Continuous query error|
 |324|NO_TEMPLATE_ON_MNODE|No schema template on current MNode|
 |325|DIFFERENT_TEMPLATE|Template is not consistent|
 |326|TEMPLATE_IS_IN_USE|Template is in use|
@@ -77,31 +85,24 @@ Here is a list of Status Code and related message:
 |330|RECORD_DUPLICATED|Record is duplicated|
 |331|SEGMENT_OUT_OF_SPACE|No enough space on schema segment|
 |332|SCHEMA_FILE_NOT_EXISTS|SchemaFile does not exist|
-|333|WRITE_AHEAD_LOG_ERROR|WAL error|
-|334|CREATE_PIPE_SINK_ERROR|Failed to create a PIPE sink|
-|335|PIPE_ERROR|PIPE error|
-|336|PIPESERVER_ERROR|PIPE server error|
-|337|SERIES_OVERFLOW|Series number exceeds the threshold|
-|340|CREATE_TEMPLATE_ERROR|Create schema template error|
-|341|SYNC_FILE_REDIRECTION_ERROR|Sync TsFile redirection error|
-|342|SYNC_FILE_ERROR|Sync TsFile error|
-|343|VERIFY_METADATA_ERROR|Meet error in validate timeseries schema|
-|344|TIMESERIES_IN_BLACK_LIST|Timeseries is being deleted|
 |349|OVERSIZE_RECORD|Size of record exceeds the threshold of page of SchemaFile|
 |350|SCHEMA_FILE_REDO_LOG_BROKEN|SchemaFile redo log has broken|
-|355|TRIGGER_FIRE_ERROR|Error when firing trigger|
-|360|TRIGGER_LOAD_CLASS_ERROR|Error when load class of trigger|
-|361|TRIGGER_DOWNLOAD_ERROR|Error when download trigger from ConfigNode|
-|362|CREATE_TRIGGER_INSTANCE_ERROR|Error when create trigger instance|
-|363|ACTIVE_TRIGGER_INSTANCE_ERROR|Error when activate trigger instance|
-|364|DROP_TRIGGER_INSTANCE_ERROR|Error when drop trigger instance|
-|365|UPDATE_TRIGGER_LOCATION_ERROR|Error when move stateful trigger to new datanode|
-|370|UDF_LOAD_CLASS_ERROR|Error when loading UDF class|
-|371|UDF_DOWNLOAD_ERROR|DataNode cannot download UDF from ConfigNode|
-|372|CREATE_FUNCTION_ON_DATANODE_ERROR|Error when create UDF on DataNode|
-|373|DROP_FUNCTION_ON_DATANODE_ERROR|Error when drop a UDF on DataNode|
-|400|EXECUTE_STATEMENT_ERROR|Execute statement error|
+
+|502|SYSTEM_READ_ONLY|IoTDB system is read only|
+|313|STORAGE_ENGINE_ERROR|Storage engine related error|
+|317|STORAGE_ENGINE_NOT_READY|The storage engine is in recovery, not ready fore accepting read/write operation|
+|311|DATAREGION_PROCESS_ERROR|DataRegion related error|
+|314|TSFILE_PROCESSOR_ERROR|TsFile processor related error|
+|412|WRITE_PROCESS_ERROR|Writing data related error|
+|413|WRITE_PROCESS_REJECT|Writing data rejected error|
+|305|OUT_OF_TTL|Insertion time is less than TTL time bound|
+|307|COMPACTION_ERROR|Meet error while merging|
+|319|ALIGNED_TIMESERIES_ERROR|Meet error in aligned timeseries|
+|333|WAL_ERROR|WAL error|
+|503|DISK_SPACE_INSUFFICIENT|Disk space is insufficient|
+
 |401|SQL_PARSE_ERROR|Meet error while parsing SQL|
+|416|SEMANTIC_ERROR|SQL semantic error|
 |402|GENERATE_TIME_ZONE_ERROR|Meet error while generating time zone|
 |403|SET_TIME_ZONE_ERROR|Meet error while setting time zone|
 |405|QUERY_NOT_ALLOWED|Query statements are not allowed error|
@@ -109,58 +110,70 @@ Here is a list of Status Code and related message:
 |408|LOGICAL_OPTIMIZE_ERROR|Logical optimize related error|
 |409|UNSUPPORTED_FILL_TYPE|Unsupported fill type related error|
 |411|QUERY_PROCESS_ERROR|Query process related error|
-|412|WRITE_PROCESS_ERROR|Writing data related error|
-|413|WRITE_PROCESS_REJECT|Writing data rejected error|
-|416|SEMANTIC_ERROR|SQL semantic error|
-|417|LOAD_PIECE_OF_TSFILE_ERROR|Error when load a piece of TsFile when loading|
-|423|MEMORY_NOT_ENOUGH|Not enough memory for task execution in MPP|
-|500|INTERNAL_SERVER_ERROR|Internal server error|
+|423|MPP_MEMORY_NOT_ENOUGH|Not enough memory for task execution in MPP|
 |501|CLOSE_OPERATION_ERROR|Meet error in close operation|
-|502|READ_ONLY_SYSTEM|Operating system is read only|
-|503|DISK_SPACE_INSUFFICIENT|Disk space is insufficient|
-|504|START_UP_ERROR|Meet error while starting up|
-|505|SHUT_DOWN_ERROR|Meet error while shutdown|
-|506|MULTIPLE_ERROR|Meet error when executing multiple statements|
 |508|TSBLOCK_SERIALIZE_ERROR|TsBlock serialization error|
+|701|INTERNAL_REQUEST_TIME_OUT|MPP Operation timeout|
+|709|INTERNAL_REQUEST_RETRY_ERROR|Internal operation retry failed|
+
+|607|AUTHENTICATION_ERROR|Error in authentication|
 |600|WRONG_LOGIN_PASSWORD|Username or password is wrong|
 |601|NOT_LOGIN|Has not logged in|
 |602|NO_PERMISSION|No permissions for this operation, please add privilege|
 |603|UNINITIALIZED_AUTH_ERROR|Uninitialized authorizer|
 |605|USER_NOT_EXIST|User does not exist|
 |606|ROLE_NOT_EXIST|Role does not exist|
-|607|AUTHENTICATION_FAILED|Error in authentication|
 |608|CLEAR_PERMISSION_CACHE_ERROR|Error when clear the permission cache|
-|701|TIME_OUT|Operation timeout|
-|703|UNSUPPORTED_OPERATION|Unsupported operation|
-|706|NO_CONNECTION|Can not get connection error|
-|707|NEED_REDIRECTION|Need direction|
-|709|ALL_RETRY_ERROR|All retry failed|
+
 |710|MIGRATE_REGION_ERROR|Error when migrate region|
 |711|CREATE_REGION_ERROR|Create region error|
 |712|DELETE_REGION_ERROR|Delete region error|
 |713|PARTITION_CACHE_UPDATE_ERROR|Update partition cache failed|
-|714|DESERIALIZE_PIECE_OF_TSFILE_ERROR|Error when deserialize a piece of TsFile|
 |715|CONSENSUS_NOT_INITIALIZED|Consensus is not initialized and cannot provide service|
-|800|CONFIGURATION_ERROR|Configuration error|
+|918|REGION_LEADER_CHANGE_ERROR|Region leader migration failed|
+|921|NO_AVAILABLE_REGION_GROUP|Cannot find an available region group|
+
 |901|DATANODE_ALREADY_REGISTERED|DataNode already registered in cluster|
-|903|DATABASE_ALREADY_EXISTS|Database already exist|
 |904|NO_ENOUGH_DATANODE|The number of DataNode is not enough, cannot remove DataNode or create enough replication|
-|905|ERROR_GLOBAL_CONFIG|Global config in cluster does not consistent|
 |906|ADD_CONFIGNODE_ERROR|Add ConfigNode error|
 |907|REMOVE_CONFIGNODE_ERROR|Remove ConfigNode error|
 |912|DATANODE_NOT_EXIST|DataNode not exist error|
 |917|DATANODE_STOP_ERROR|DataNode stop error|
-|918|REGION_LEADER_CHANGE_ERROR|Region leader migration failed|
 |919|REMOVE_DATANODE_ERROR|Remove datanode failed|
-|920|OVERLAP_WITH_EXISTING_TASK|Current task has some conflict with existing tasks|
-|921|NOT_AVAILABLE_REGION_GROUP|Cannot find an available region group|
-|922|CREATE_TRIGGER_ERROR|ConfigNode create trigger error|
-|923|DROP_TRIGGER_ERROR|ConfigNode delete Trigger error|
 |925|REGISTER_REMOVED_DATANODE|The DataNode to be registered is removed before|
-|930|NO_SUCH_CQ|CQ task does not exist|
-|931|CQ_ALREADY_ACTIVE|CQ is already active|
-|932|CQ_AlREADY_EXIST|CQ is already exist|
-|933|CQ_UPDATE_LAST_EXEC_TIME_ERROR|CQ update last execution time failed|
+|706|CAN_NOT_CONNECT_DATANODE|Can not connect to DataNode|
+
+|316|LOAD_FILE_ERROR|Meet error while loading file|
+|417|LOAD_PIECE_OF_TSFILE_ERROR|Error when load a piece of TsFile when loading|
+|714|DESERIALIZE_PIECE_OF_TSFILE_ERROR|Error when deserialize a piece of TsFile|
+
+|334|CREATE_PIPE_SINK_ERROR|Failed to create a PIPE sink|
+|335|PIPE_ERROR|PIPE error|
+|336|PIPESERVER_ERROR|PIPE server error|
+|310|SYNC_CONNECTION_ERROR|Meet error while sync connecting|
+|341|SYNC_FILE_REDIRECTION_ERROR|Sync TsFile redirection error|
+|342|SYNC_FILE_ERROR|Sync TsFile error|
+|343|VERIFY_METADATA_ERROR|Meet error in validate timeseries schema|
+
+|370|UDF_LOAD_CLASS_ERROR|Error when loading UDF class|
+|371|UDF_DOWNLOAD_ERROR|DataNode cannot download UDF from ConfigNode|
+|372|CREATE_UDF_ON_DATANODE_ERROR|Error when create UDF on DataNode|
+|373|DROP_UDF_ON_DATANODE_ERROR|Error when drop a UDF on DataNode|
+
+|950|CREATE_TRIGGER_ERROR|ConfigNode create trigger error|
+|951|DROP_TRIGGER_ERROR|ConfigNode delete Trigger error|
+|952|TRIGGER_FIRE_ERROR|Error when firing trigger|
+|953|TRIGGER_LOAD_CLASS_ERROR|Error when load class of trigger|
+|954|TRIGGER_DOWNLOAD_ERROR|Error when download trigger from ConfigNode|
+|955|CREATE_TRIGGER_INSTANCE_ERROR|Error when create trigger instance|
+|956|ACTIVE_TRIGGER_INSTANCE_ERROR|Error when activate trigger instance|
+|957|DROP_TRIGGER_INSTANCE_ERROR|Error when drop trigger instance|
+|958|UPDATE_TRIGGER_LOCATION_ERROR|Error when move stateful trigger to new datanode|
+
+|1000|NO_SUCH_CQ|CQ task does not exist|
+|1001|CQ_ALREADY_ACTIVE|CQ is already active|
+|1002|CQ_AlREADY_EXIST|CQ is already exist|
+|1003|CQ_UPDATE_LAST_EXEC_TIME_ERROR|CQ update last execution time failed|
 
 > All exceptions are refactored in the latest version by extracting uniform message into exception classes. Different error codes are added to all exceptions. When an exception is caught and a higher-level exception is thrown, the error code will keep and pass so that users will know the detailed error reason.
 A base exception class "ProcessException" is also added to be extended by all exceptions.
diff --git a/docs/zh/UserGuide/API/Status-Codes.md b/docs/zh/UserGuide/API/Status-Codes.md
index 95f07324dd..fcf80e4a0b 100644
--- a/docs/zh/UserGuide/API/Status-Codes.md
+++ b/docs/zh/UserGuide/API/Status-Codes.md
@@ -46,29 +46,37 @@ try {
 |状态码|状态类型|状态信息|
 |:--|:---|:---|
 |200|SUCCESS_STATUS|成功状态|
-|201|STILL_EXECUTING_STATUS|仍在执行状态|
+
 |203|INCOMPATIBLE_VERSION|版本不兼容|
-|298|NODE_DELETE_ERROR|删除节点失败|
+|800|CONFIGURATION_ERROR|配置文件有错误项|
+|504|START_UP_ERROR|启动错误|
+|505|SHUT_DOWN_ERROR|关机错误|
+
+
+|703|UNSUPPORTED_OPERATION|不支持的操作|
+|400|EXECUTE_STATEMENT_ERROR|执行语句错误|
+|506|MULTIPLE_ERROR|多行语句执行错误|
+|318|ILLEGAL_PARAMETER|参数错误|
+|920|OVERLAP_WITH_EXISTING_TASK|与正在执行的其他操作冲突|
+|500|INTERNAL_SERVER_ERROR|服务器内部错误|
+
+
+|707|REDIRECTION_RECOMMEND|推荐客户端重定向|
+
+
+|322|DATABASE_NOT_EXIST|数据库不存在|
+|903|DATABASE_ALREADY_EXISTS|数据库已存在|
+|337|SERIES_OVERFLOW|序列数量超过阈值|
+|338|TIMESERIES_ALREADY_EXIST|序列数量超过阈值|
+|344|TIMESERIES_IN_BLACK_LIST|时间序列正在删除|
 |299|ALIAS_ALREADY_EXIST|路径别名已经存在|
 |300|PATH_ALREADY_EXIST|路径已经存在|
 |303|METADATA_ERROR|处理元数据错误|
 |304|PATH_NOT_EXIST|路径不存在|
-|305|OUT_OF_TTL|插入时间少于 TTL 时间边界|
-|307|COMPACTION_ERROR|合并错误|
-|308|SYSTEM_CHECK_ERROR|系统检查错误|
-|310|SYNC_CONNECTION_ERROR|回传连接错误|
-|311|DATABASE_PROCESS_ERROR|存储组处理器相关错误|
-|313|STORAGE_ENGINE_ERROR|存储引擎相关错误|
-|314|TSFILE_PROCESSOR_ERROR|TsFile 处理器相关错误|
-|315|PATH_ILLEGAL|路径不合法|
-|316|LOAD_FILE_ERROR|加载文件错误|
-|317|DATABASE_NOT_READY|Database 还在恢复中,还不能接受读写操作|
-|318|ILLEGAL_PARAMETER|参数错误|
-|319|ALIGNED_TIMESERIES_ERROR|对齐时间序列错误|
+|315|ILLEGAL_PATH|路径不合法|
+|340|CREATE_TEMPLATE_ERROR|创建物理量模板失败|
 |320|DUPLICATED_TEMPLATE|元数据模板重复|
 |321|UNDEFINED_TEMPLATE|元数据模板未定义|
-|322|DATABASE_NOT_EXIST|数据库不存在|
-|323|CONTINUOUS_QUERY_ERROR|连续查询功能错误|
 |324|NO_TEMPLATE_ON_MNODE|当前元数据节点不存在元数据模板|
 |325|DIFFERENT_TEMPLATE|元数据模板不一致|
 |326|TEMPLATE_IS_IN_USE|元数据模板正在使用|
@@ -78,32 +86,25 @@ try {
 |330|RECORD_DUPLICATED|记录重复|
 |331|SEGMENT_OUT_OF_SPACE|SchemaFile 中 segment 空间不够|
 |332|SCHEMA_FILE_NOT_EXISTS|SchemaFile 不存在|
-|333|WRITE_AHEAD_LOG_ERROR|WAL 异常|
-|334|CREATE_PIPE_SINK_ERROR|创建 PIPE Sink 失败|
-|335|PIPE_ERROR|PIPE 异常|
-|336|PIPESERVER_ERROR|PIPE server 异常|
-|337|SERIES_OVERFLOW|序列数量超过阈值|
-|338|MEASUREMENT_ALREADY_EXIST|序列数量超过阈值|
-|340|CREATE_TEMPLATE_ERROR|创建物理量模板失败|
-|341|SYNC_FILE_REDIRECTION_ERROR|同步文件时重定向异常|
-|342|SYNC_FILE_ERROR|同步文件异常|
-|343|VERIFY_METADATA_ERROR|校验元数据失败|
-|344|TIMESERIES_IN_BLACK_LIST|时间序列正在删除|
 |349|OVERSIZE_RECORD|记录大小超过元数据文件页面大小|
 |350|SCHEMA_FILE_REDO_LOG_BROKEN|SchemaFile 的 redo 日志损坏|
-|355|TRIGGER_FIRE_ERROR|触发器执行错误|
-|360|TRIGGER_LOAD_CLASS_ERROR|触发器加载类异常|
-|361|TRIGGER_DOWNLOAD_ERROR|从 ConfigNode 下载触发器异常|
-|362|CREATE_TRIGGER_INSTANCE_ERROR|创建触发器实例异常|
-|363|ACTIVE_TRIGGER_INSTANCE_ERROR|激活触发器实例异常|
-|364|DROP_TRIGGER_INSTANCE_ERROR|删除触发器实例异常|
-|365|UPDATE_TRIGGER_LOCATION_ERROR|更新有状态的触发器所在 DataNode 异常|
-|370|UDF_LOAD_CLASS_ERROR|UDF 加载类异常|
-|371|UDF_DOWNLOAD_ERROR|无法从 ConfigNode 下载 UDF|
-|372|CREATE_FUNCTION_ON_DATANODE_ERROR|在 DataNode 创建 UDF 失败|
-|373|DROP_FUNCTION_ON_DATANODE_ERROR|在 DataNode 卸载 UDF 失败|
-|400|EXECUTE_STATEMENT_ERROR|执行语句错误|
+
+|502|SYSTEM_READ_ONLY|IoTDB 系统只读|
+|313|STORAGE_ENGINE_ERROR|存储引擎相关错误|
+|317|STORAGE_ENGINE_NOT_READY|存储引擎还在恢复中,还不能接受读写操作|
+|311|DATAREGION_PROCESS_ERROR|DataRegion 相关错误|
+|314|TSFILE_PROCESSOR_ERROR|TsFile 处理器相关错误|
+|412|WRITE_PROCESS_ERROR|写入相关错误|
+|413|WRITE_PROCESS_REJECT|写入拒绝错误|
+|305|OUT_OF_TTL|插入时间少于 TTL 时间边界|
+|307|COMPACTION_ERROR|合并错误|
+|319|ALIGNED_TIMESERIES_ERROR|对齐时间序列错误|
+|333|WAL_ERROR|WAL 异常|
+|503|DISK_SPACE_INSUFFICIENT|磁盘空间不足|
+
+
 |401|SQL_PARSE_ERROR|SQL 语句分析错误|
+|416|SEMANTIC_ERROR|SQL 语义错误|
 |402|GENERATE_TIME_ZONE_ERROR|生成时区错误|
 |403|SET_TIME_ZONE_ERROR|设置时区错误|
 |405|QUERY_NOT_ALLOWED|查询语句不允许|
@@ -111,59 +112,70 @@ try {
 |408|LOGICAL_OPTIMIZE_ERROR|逻辑优化相关错误|
 |409|UNSUPPORTED_FILL_TYPE|不支持的填充类型|
 |411|QUERY_PROCESS_ERROR|查询处理相关错误|
-|412|WRITE_PROCESS_ERROR|写入相关错误|
-|413|WRITE_PROCESS_REJECT|写入拒绝错误|
-|416|SEMANTIC_ERROR|SQL 语义错误|
-|417|LOAD_PIECE_OF_TSFILE_ERROR|加载 TsFile 片段异常|
-|423|MEMORY_NOT_ENOUGH|MPP 框架中任务执行内存不足|
-|500|INTERNAL_SERVER_ERROR|服务器内部错误|
+|423|MPP_MEMORY_NOT_ENOUGH|MPP 框架中任务执行内存不足|
 |501|CLOSE_OPERATION_ERROR|关闭操作错误|
-|502|READ_ONLY_SYSTEM|系统只读|
-|503|DISK_SPACE_INSUFFICIENT|磁盘空间不足|
-|504|START_UP_ERROR|启动错误|
-|505|SHUT_DOWN_ERROR|关机错误|
-|506|MULTIPLE_ERROR|多行语句执行错误|
 |508|TSBLOCK_SERIALIZE_ERROR|TsBlock 序列化错误|
+|701|INTERNAL_REQUEST_TIME_OUT|MPP 操作超时|
+|709|INTERNAL_REQUEST_RETRY_ERROR|内部操作重试失败|
+
+|607|AUTHENTICATION_ERROR|权限认证失败|
 |600|WRONG_LOGIN_PASSWORD|用户名或密码错误|
 |601|NOT_LOGIN|没有登录|
 |602|NO_PERMISSION|没有操作权限|
 |603|UNINITIALIZED_AUTH_ERROR|授权人未初始化|
-|604|EXECUTE_PERMISSION_EXCEPTION_ERROR||
 |605|USER_NOT_EXIST|用户不存在|
 |606|ROLE_NOT_EXIST|角色不存在|
-|607|AUTHENTICATION_FAILED|权限认证失败|
 |608|CLEAR_PERMISSION_CACHE_ERROR|清空权限缓存失败|
-|701|TIME_OUT|操作超时|
-|703|UNSUPPORTED_OPERATION|不支持的操作|
-|706|NO_CONNECTION|连接获取失败|
-|707|NEED_REDIRECTION|需要重定向|
-|709|ALL_RETRY_ERROR|所有重试失败|
+
 |710|MIGRATE_REGION_ERROR|Region 迁移失败|
 |711|CREATE_REGION_ERROR|创建 region 失败|
 |712|DELETE_REGION_ERROR|删除 region 失败|
 |713|PARTITION_CACHE_UPDATE_ERROR|更新分区缓存失败|
-|714|DESERIALIZE_PIECE_OF_TSFILE_ERROR|反序列化 TsFile 片段异常|
 |715|CONSENSUS_NOT_INITIALIZED|共识层未初始化,不能提供服务|
-|800|CONFIGURATION_ERROR|配置文件有错误项|
+|918|REGION_LEADER_CHANGE_ERROR|Region leader 迁移失败|
+|921|NO_AVAILABLE_REGION_GROUP|无法找到可用的 Region 副本组|
+
 |901|DATANODE_ALREADY_REGISTERED|DataNode 在集群中已经注册|
-|903|DATABASE_ALREADY_EXISTS|Database 已存在|
 |904|NO_ENOUGH_DATANODE|DataNode 数量不足,无法移除节点或创建副本|
-|905|ERROR_GLOBAL_CONFIG|全局配置参数异常|
 |906|ADD_CONFIGNODE_ERROR|新增 ConfigNode 失败|
 |907|REMOVE_CONFIGNODE_ERROR|移除 ConfigNode 失败|
 |912|DATANODE_NOT_EXIST|此 DataNode 不存在|
 |917|DATANODE_STOP_ERROR|DataNode 关闭失败|
-|918|REGION_LEADER_CHANGE_ERROR|Region leader 迁移失败|
 |919|REMOVE_DATANODE_ERROR|移除 datanode 失败|
-|920|OVERLAP_WITH_EXISTING_TASK|与正在执行的其他操作冲突|
-|921|NOT_AVAILABLE_REGION_GROUP|无法找到可用的 Region 副本组|
-|922|CREATE_TRIGGER_ERROR|ConfigNode 创建 Trigger 失败|
-|923|DROP_TRIGGER_ERROR|ConfigNode 删除 Trigger 失败|
 |925|REGISTER_REMOVED_DATANODE|注册的 DataNode 已经被移除|
-|930|NO_SUCH_CQ|CQ 任务不存在|
-|931|CQ_ALREADY_ACTIVE|CQ 任务已激活|
-|932|CQ_AlREADY_EXIST|CQ 任务已存在|
-|933|CQ_UPDATE_LAST_EXEC_TIME_ERROR|CQ 更新上一次执行时间失败|
+|706|CAN_NOT_CONNECT_DATANODE|连接 DataNode 失败|
+
+|316|LOAD_FILE_ERROR|加载文件错误|
+|417|LOAD_PIECE_OF_TSFILE_ERROR|加载 TsFile 片段异常|
+|714|DESERIALIZE_PIECE_OF_TSFILE_ERROR|反序列化 TsFile 片段异常|
+
+|310|SYNC_CONNECTION_ERROR|回传连接错误|
+|341|SYNC_FILE_REDIRECTION_ERROR|同步文件时重定向异常|
+|342|SYNC_FILE_ERROR|同步文件异常|
+|334|CREATE_PIPE_SINK_ERROR|创建 PIPE Sink 失败|
+|335|PIPE_ERROR|PIPE 异常|
+|336|PIPESERVER_ERROR|PIPE server 异常|
+|343|VERIFY_METADATA_ERROR|校验元数据失败|
+
+|370|UDF_LOAD_CLASS_ERROR|UDF 加载类异常|
+|371|UDF_DOWNLOAD_ERROR|无法从 ConfigNode 下载 UDF|
+|372|CREATE_UDF_ON_DATANODE_ERROR|在 DataNode 创建 UDF 失败|
+|373|DROP_UDF_ON_DATANODE_ERROR|在 DataNode 卸载 UDF 失败|
+
+|950|CREATE_TRIGGER_ERROR|ConfigNode 创建 Trigger 失败|
+|951|DROP_TRIGGER_ERROR|ConfigNode 删除 Trigger 失败|
+|952|TRIGGER_FIRE_ERROR|触发器执行错误|
+|953|TRIGGER_LOAD_CLASS_ERROR|触发器加载类异常|
+|954|TRIGGER_DOWNLOAD_ERROR|从 ConfigNode 下载触发器异常|
+|955|CREATE_TRIGGER_INSTANCE_ERROR|创建触发器实例异常|
+|956|ACTIVE_TRIGGER_INSTANCE_ERROR|激活触发器实例异常|
+|957|DROP_TRIGGER_INSTANCE_ERROR|删除触发器实例异常|
+|958|UPDATE_TRIGGER_LOCATION_ERROR|更新有状态的触发器所在 DataNode 异常|
+
+|1000|NO_SUCH_CQ|CQ 任务不存在|
+|1001|CQ_ALREADY_ACTIVE|CQ 任务已激活|
+|1002|CQ_AlREADY_EXIST|CQ 任务已存在|
+|1003|CQ_UPDATE_LAST_EXEC_TIME_ERROR|CQ 更新上一次执行时间失败|
 
 > 在最新版本中,我们重构了 IoTDB 的异常类。通过将错误信息统一提取到异常类中,并为所有异常添加不同的错误代码,从而当捕获到异常并引发更高级别的异常时,错误代码将保留并传递,以便用户了解详细的错误原因。
 除此之外,我们添加了一个基础异常类“ProcessException”,由所有异常扩展。
diff --git a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSimpleIT.java b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSimpleIT.java
index 7e1b8d5cae..60f85f50ae 100644
--- a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSimpleIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSimpleIT.java
@@ -1011,7 +1011,7 @@ public class IoTDBSessionSimpleIT {
             e.getMessage()
                 .contains(
                     String.format(
-                        msg, TSStatusCode.PATH_ILLEGAL, OperationType.INSERT_RECORDS, deviceId)));
+                        msg, TSStatusCode.ILLEGAL_PATH, OperationType.INSERT_RECORDS, deviceId)));
       }
 
       try {
@@ -1023,7 +1023,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.INSERT_STRING_RECORDS,
                         deviceIds.get(0))));
       }
@@ -1036,7 +1036,7 @@ public class IoTDBSessionSimpleIT {
             e.getMessage()
                 .contains(
                     String.format(
-                        msg, TSStatusCode.PATH_ILLEGAL, OperationType.INSERT_RECORD, deviceId)));
+                        msg, TSStatusCode.ILLEGAL_PATH, OperationType.INSERT_RECORD, deviceId)));
       }
 
       try {
@@ -1048,7 +1048,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.INSERT_STRING_RECORD,
                         deviceId)));
       }
@@ -1063,7 +1063,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.INSERT_RECORDS_OF_ONE_DEVICE,
                         deviceId)));
       }
@@ -1077,7 +1077,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.DELETE_DATA,
                         deviceId + ".s1")));
       }
@@ -1108,7 +1108,7 @@ public class IoTDBSessionSimpleIT {
             e.getMessage()
                 .contains(
                     String.format(
-                        msg, TSStatusCode.PATH_ILLEGAL, OperationType.INSERT_TABLET, deviceId)));
+                        msg, TSStatusCode.ILLEGAL_PATH, OperationType.INSERT_TABLET, deviceId)));
       }
 
       try {
@@ -1152,7 +1152,7 @@ public class IoTDBSessionSimpleIT {
             e.getMessage()
                 .contains(
                     String.format(
-                        msg, TSStatusCode.PATH_ILLEGAL, OperationType.INSERT_TABLETS, deviceId)));
+                        msg, TSStatusCode.ILLEGAL_PATH, OperationType.INSERT_TABLETS, deviceId)));
       }
 
       try {
@@ -1164,7 +1164,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.SET_STORAGE_GROUP,
                         "root..sg")));
       }
@@ -1179,7 +1179,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.CREATE_TIMESERIES,
                         "root.sg..d1.s1")));
       }
@@ -1202,7 +1202,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.CREATE_ALIGNED_TIMESERIES,
                         deviceId)));
       }
@@ -1224,7 +1224,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.CREATE_MULTI_TIMESERIES,
                         "root.sg.d1..s1")));
       }
@@ -1238,7 +1238,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.DELETE_TIMESERIES,
                         "root.sg.d1..s1")));
       }
diff --git a/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java
index b3633436ef..80dd103eb7 100644
--- a/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java
+++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java
@@ -343,7 +343,7 @@ public class IoTDBStatement implements Statement {
       if (execResp.getCode() == TSStatusCode.MULTIPLE_ERROR.getStatusCode()) {
         result[i] = execResp.getSubStatus().get(i).code;
         if (result[i] != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-            && result[i] != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+            && result[i] != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
           allSuccess = false;
           message
               .append(execResp.getSubStatus().get(i).message)
@@ -356,7 +356,7 @@ public class IoTDBStatement implements Statement {
         allSuccess =
             allSuccess
                 && (execResp.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
-                    || execResp.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode());
+                    || execResp.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode());
         result[i] = execResp.getCode();
         message.setLength(0);
         message.append(execResp.getMessage());
diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPathException.java b/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPathException.java
index 70fce45364..f1c46742cc 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPathException.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPathException.java
@@ -26,13 +26,13 @@ public class IllegalPathException extends MetadataException {
 
   public IllegalPathException(String path) {
     super(String.format("%s is not a legal path", path));
-    errorCode = TSStatusCode.PATH_ILLEGAL.getStatusCode();
+    errorCode = TSStatusCode.ILLEGAL_PATH.getStatusCode();
     this.isUserException = true;
   }
 
   public IllegalPathException(String path, String reason) {
     super(String.format("%s is not a legal path, because %s", path, reason));
-    errorCode = TSStatusCode.PATH_ILLEGAL.getStatusCode();
+    errorCode = TSStatusCode.ILLEGAL_PATH.getStatusCode();
     this.isUserException = true;
   }
 }
diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java b/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java
index 54d66c0ea9..6eb10e4e50 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java
@@ -57,14 +57,14 @@ public class StatusUtils {
       case SUCCESS_STATUS:
         status.setMessage("Executed successfully.");
         break;
-      case TIME_OUT:
+      case INTERNAL_REQUEST_TIME_OUT:
         status.setMessage("Request timed out.");
         break;
       case INCOMPATIBLE_VERSION:
         status.setMessage("Incompatible version.");
         break;
-      case NODE_DELETE_ERROR:
-        status.setMessage("Failed while deleting node.");
+      case REMOVE_DATANODE_ERROR:
+        status.setMessage("Failed while removing DataNode.");
         break;
       case ALIAS_ALREADY_EXIST:
         status.setMessage("Alias already exists.");
@@ -84,13 +84,10 @@ public class StatusUtils {
       case COMPACTION_ERROR:
         status.setMessage("Meet error while merging.");
         break;
-      case SYSTEM_CHECK_ERROR:
-        status.setMessage("Meet error while system checking.");
-        break;
       case SYNC_CONNECTION_ERROR:
         status.setMessage("Meet error while sync connecting.");
         break;
-      case DATABASE_PROCESS_ERROR:
+      case DATAREGION_PROCESS_ERROR:
         status.setMessage("Database processor related error.");
         break;
       case STORAGE_ENGINE_ERROR:
@@ -99,7 +96,7 @@ public class StatusUtils {
       case TSFILE_PROCESSOR_ERROR:
         status.setMessage("TsFile processor related error.");
         break;
-      case PATH_ILLEGAL:
+      case ILLEGAL_PATH:
         status.setMessage("Illegal path.");
         break;
       case LOAD_FILE_ERROR:
@@ -141,7 +138,7 @@ public class StatusUtils {
       case CLOSE_OPERATION_ERROR:
         status.setMessage("Meet error in close operation.");
         break;
-      case READ_ONLY_SYSTEM:
+      case SYSTEM_READ_ONLY:
         status.setMessage("Database is read-only.");
         break;
       case DISK_SPACE_INSUFFICIENT:
@@ -165,7 +162,7 @@ public class StatusUtils {
       case UNSUPPORTED_OPERATION:
         status.setMessage("Unsupported operation.");
         break;
-      case NO_CONNECTION:
+      case CAN_NOT_CONNECT_DATANODE:
         status.setMessage("Node cannot be reached.");
         break;
       default:
diff --git a/server/src/main/java/org/apache/iotdb/db/auth/StandaloneAuthorityFetcher.java b/server/src/main/java/org/apache/iotdb/db/auth/StandaloneAuthorityFetcher.java
index 735fd42c35..12bedec871 100644
--- a/server/src/main/java/org/apache/iotdb/db/auth/StandaloneAuthorityFetcher.java
+++ b/server/src/main/java/org/apache/iotdb/db/auth/StandaloneAuthorityFetcher.java
@@ -50,7 +50,7 @@ public class StandaloneAuthorityFetcher implements IAuthorityFetcher {
         return RpcUtils.getStatus(TSStatusCode.WRONG_LOGIN_PASSWORD, "Authentication failed.");
       }
     } catch (AuthException e) {
-      return RpcUtils.getStatus(TSStatusCode.AUTHENTICATION_FAILED, e.getMessage());
+      return RpcUtils.getStatus(TSStatusCode.AUTHENTICATION_ERROR, e.getMessage());
     }
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java b/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java
index e85ae84c85..9b699608f7 100644
--- a/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java
+++ b/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java
@@ -269,7 +269,7 @@ public class ConfigNodeClient
   }
 
   private boolean updateConfigNodeLeader(TSStatus status) {
-    if (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+    if (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       if (status.isSetRedirectNode()) {
         configLeader =
             new TEndPoint(status.getRedirectNode().getIp(), status.getRedirectNode().getPort());
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/StorageEngineV2.java b/server/src/main/java/org/apache/iotdb/db/engine/StorageEngineV2.java
index edc2483679..a694f80c69 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/StorageEngineV2.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/StorageEngineV2.java
@@ -724,7 +724,7 @@ public class StorageEngineV2 implements IService {
               "IO error when writing piece node of TsFile %s to DataRegion %s.",
               pieceNode.getTsFile(), dataRegionId),
           e);
-      status.setCode(TSStatusCode.DATABASE_PROCESS_ERROR.getStatusCode());
+      status.setCode(TSStatusCode.LOAD_FILE_ERROR.getStatusCode());
       status.setMessage(e.getMessage());
       return status;
     }
@@ -763,11 +763,7 @@ public class StorageEngineV2 implements IService {
           status.setCode(TSStatusCode.ILLEGAL_PARAMETER.getStatusCode());
           status.setMessage(String.format("Wrong load command %s.", loadCommand));
       }
-    } catch (IOException e) {
-      logger.error(String.format("Execute load command %s error.", loadCommand), e);
-      status.setCode(TSStatusCode.DATABASE_PROCESS_ERROR.getStatusCode());
-      status.setMessage(e.getMessage());
-    } catch (LoadFileException e) {
+    } catch (IOException | LoadFileException e) {
       logger.error(String.format("Execute load command %s error.", loadCommand), e);
       status.setCode(TSStatusCode.LOAD_FILE_ERROR.getStatusCode());
       status.setMessage(e.getMessage());
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/ContinuousQueryException.java b/server/src/main/java/org/apache/iotdb/db/exception/ContinuousQueryException.java
deleted file mode 100644
index e846e986e6..0000000000
--- a/server/src/main/java/org/apache/iotdb/db/exception/ContinuousQueryException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.iotdb.db.exception;
-
-import org.apache.iotdb.rpc.TSStatusCode;
-
-public class ContinuousQueryException extends StorageEngineException {
-
-  public ContinuousQueryException(String message) {
-    super(message, TSStatusCode.CONTINUOUS_QUERY_ERROR.getStatusCode());
-    this.isUserException = true;
-  }
-
-  public ContinuousQueryException(String message, Exception e) {
-    super(message, e);
-    this.errorCode = TSStatusCode.CONTINUOUS_QUERY_ERROR.getStatusCode();
-    this.isUserException = true;
-  }
-}
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/DataRegionException.java b/server/src/main/java/org/apache/iotdb/db/exception/DataRegionException.java
index 5c76935147..3dc9f5d710 100644
--- a/server/src/main/java/org/apache/iotdb/db/exception/DataRegionException.java
+++ b/server/src/main/java/org/apache/iotdb/db/exception/DataRegionException.java
@@ -26,10 +26,10 @@ public class DataRegionException extends IoTDBException {
   private static final long serialVersionUID = 7373978140952977661L;
 
   public DataRegionException(Exception exception) {
-    super(exception, TSStatusCode.DATABASE_PROCESS_ERROR.getStatusCode());
+    super(exception, TSStatusCode.DATAREGION_PROCESS_ERROR.getStatusCode());
   }
 
   public DataRegionException(String message) {
-    super(message, TSStatusCode.DATABASE_PROCESS_ERROR.getStatusCode());
+    super(message, TSStatusCode.DATAREGION_PROCESS_ERROR.getStatusCode());
   }
 }
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java b/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java
index 184e584683..1d272280e9 100644
--- a/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java
+++ b/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java
@@ -27,6 +27,6 @@ public class StorageEngineReadonlyException extends StorageEngineException {
       "Database is read-only, and does not accept non-query operation now";
 
   public StorageEngineReadonlyException() {
-    super(ERROR_MESSAGE, TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+    super(ERROR_MESSAGE, TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
   }
 }
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/SystemCheckException.java b/server/src/main/java/org/apache/iotdb/db/exception/SystemCheckException.java
deleted file mode 100644
index 609a24be8f..0000000000
--- a/server/src/main/java/org/apache/iotdb/db/exception/SystemCheckException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.iotdb.db.exception;
-
-import org.apache.iotdb.commons.exception.IoTDBException;
-import org.apache.iotdb.rpc.TSStatusCode;
-
-public class SystemCheckException extends IoTDBException {
-
-  private static final long serialVersionUID = 3845398095925149972L;
-
-  public SystemCheckException(String walFolder) {
-    super(
-        String.format("[%s] is not a directory", walFolder),
-        TSStatusCode.SYSTEM_CHECK_ERROR.getStatusCode());
-  }
-}
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/index/UnsupportedIndexTypeException.java b/server/src/main/java/org/apache/iotdb/db/exception/index/UnsupportedIndexTypeException.java
deleted file mode 100644
index 1bea1415c6..0000000000
--- a/server/src/main/java/org/apache/iotdb/db/exception/index/UnsupportedIndexTypeException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.iotdb.db.exception.index;
-
-import org.apache.iotdb.db.exception.query.QueryProcessException;
-import org.apache.iotdb.rpc.TSStatusCode;
-
-public class UnsupportedIndexTypeException extends QueryProcessException {
-
-  private static final long serialVersionUID = -7091830159338197925L;
-
-  public UnsupportedIndexTypeException(String indexType) {
-    super(
-        "Unsupported index type: " + indexType,
-        TSStatusCode.UNSUPPORTED_INDEX_TYPE.getStatusCode());
-  }
-}
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/metadata/DeleteFailedException.java b/server/src/main/java/org/apache/iotdb/db/exception/metadata/DeleteFailedException.java
deleted file mode 100644
index 2bff5f9300..0000000000
--- a/server/src/main/java/org/apache/iotdb/db/exception/metadata/DeleteFailedException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.iotdb.db.exception.metadata;
-
-import org.apache.iotdb.commons.exception.MetadataException;
-import org.apache.iotdb.rpc.TSStatusCode;
-
-public class DeleteFailedException extends MetadataException {
-
-  private String name;
-
-  public DeleteFailedException(String name) {
-    super(
-        String.format("Node [%s] is being used. Deletion failed.", name),
-        TSStatusCode.NODE_DELETE_ERROR.getStatusCode());
-    this.name = name;
-  }
-
-  public String getName() {
-    return name;
-  }
-}
diff --git a/server/src/main/java/org/apache/iotdb/db/index/common/IndexType.java b/server/src/main/java/org/apache/iotdb/db/index/common/IndexType.java
index 177e7bd47f..359b5422b4 100644
--- a/server/src/main/java/org/apache/iotdb/db/index/common/IndexType.java
+++ b/server/src/main/java/org/apache/iotdb/db/index/common/IndexType.java
@@ -18,7 +18,6 @@
  */
 package org.apache.iotdb.db.index.common;
 
-import org.apache.iotdb.db.exception.index.UnsupportedIndexTypeException;
 import org.apache.iotdb.tsfile.exception.NotImplementedException;
 
 public enum IndexType {
@@ -72,13 +71,8 @@ public enum IndexType {
     }
   }
 
-  public static IndexType getIndexType(String indexTypeString)
-      throws UnsupportedIndexTypeException {
+  public static IndexType getIndexType(String indexTypeString) {
     String normalized = indexTypeString.toUpperCase();
-    try {
-      return IndexType.valueOf(normalized);
-    } catch (IllegalArgumentException e) {
-      throw new UnsupportedIndexTypeException(indexTypeString);
-    }
+    return IndexType.valueOf(normalized);
   }
 }
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionMemoryImpl.java b/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionMemoryImpl.java
index 7fd1e6af2e..76bcad4d5f 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionMemoryImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionMemoryImpl.java
@@ -30,7 +30,6 @@ import org.apache.iotdb.consensus.ConsensusFactory;
 import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
 import org.apache.iotdb.db.engine.trigger.executor.TriggerEngine;
-import org.apache.iotdb.db.exception.metadata.DeleteFailedException;
 import org.apache.iotdb.db.exception.metadata.MeasurementAlreadyExistException;
 import org.apache.iotdb.db.exception.metadata.PathAlreadyExistException;
 import org.apache.iotdb.db.exception.metadata.PathNotExistException;
@@ -771,7 +770,7 @@ public class SchemaRegionMemoryImpl implements ISchemaRegion {
       Set<String> failedNames = new HashSet<>();
       int deletedNum = 0;
       for (PartialPath p : allTimeseries) {
-        deleteSingleTimeseriesInternal(p, failedNames);
+        deleteSingleTimeseriesInternal(p);
         deletedNum++;
       }
       return new Pair<>(deletedNum, failedNames);
@@ -889,15 +888,10 @@ public class SchemaRegionMemoryImpl implements ISchemaRegion {
     return deleteTimeseries(pathPattern, false);
   }
 
-  private void deleteSingleTimeseriesInternal(PartialPath p, Set<String> failedNames)
-      throws MetadataException, IOException {
-    try {
-      PartialPath emptyStorageGroup = deleteOneTimeseriesUpdateStatisticsAndDropTrigger(p);
-      if (!isRecovering) {
-        writeToMLog(SchemaRegionPlanFactory.getDeleteTimeSeriesPlan(Collections.singletonList(p)));
-      }
-    } catch (DeleteFailedException e) {
-      failedNames.add(e.getName());
+  private void deleteSingleTimeseriesInternal(PartialPath p) throws MetadataException, IOException {
+    deleteOneTimeseriesUpdateStatisticsAndDropTrigger(p);
+    if (!isRecovering) {
+      writeToMLog(SchemaRegionPlanFactory.getDeleteTimeSeriesPlan(Collections.singletonList(p)));
     }
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java b/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java
index adc3ab3033..1748d31dfa 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java
@@ -30,7 +30,6 @@ import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
 import org.apache.iotdb.db.engine.trigger.executor.TriggerEngine;
 import org.apache.iotdb.db.exception.metadata.AliasAlreadyExistException;
-import org.apache.iotdb.db.exception.metadata.DeleteFailedException;
 import org.apache.iotdb.db.exception.metadata.PathAlreadyExistException;
 import org.apache.iotdb.db.exception.metadata.PathNotExistException;
 import org.apache.iotdb.db.exception.metadata.SchemaDirCreationFailureException;
@@ -850,7 +849,7 @@ public class SchemaRegionSchemaFileImpl implements ISchemaRegion {
       Set<String> failedNames = new HashSet<>();
       int deletedNum = 0;
       for (PartialPath p : allTimeseries) {
-        deleteSingleTimeseriesInternal(p, failedNames);
+        deleteSingleTimeseriesInternal(p);
         deletedNum++;
       }
       return new Pair<>(deletedNum, failedNames);
@@ -970,15 +969,10 @@ public class SchemaRegionSchemaFileImpl implements ISchemaRegion {
     return deleteTimeseries(pathPattern, false);
   }
 
-  private void deleteSingleTimeseriesInternal(PartialPath p, Set<String> failedNames)
-      throws MetadataException, IOException {
-    try {
-      PartialPath emptyStorageGroup = deleteOneTimeseriesUpdateStatisticsAndDropTrigger(p);
-      if (!isRecovering) {
-        writeToMLog(SchemaRegionPlanFactory.getDeleteTimeSeriesPlan(Collections.singletonList(p)));
-      }
-    } catch (DeleteFailedException e) {
-      failedNames.add(e.getName());
+  private void deleteSingleTimeseriesInternal(PartialPath p) throws MetadataException, IOException {
+    deleteOneTimeseriesUpdateStatisticsAndDropTrigger(p);
+    if (!isRecovering) {
+      writeToMLog(SchemaRegionPlanFactory.getDeleteTimeSeriesPlan(Collections.singletonList(p)));
     }
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java
index 4b1b57dfa3..dbcefcafea 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java
@@ -115,7 +115,7 @@ public abstract class AbstractIntoOperator implements ProcessOperator {
     }
     TSStatus executionStatus = client.insertTablets(insertMultiTabletsStatement);
     if (executionStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-        && executionStatus.getCode() != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+        && executionStatus.getCode() != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       String message =
           String.format(
               "Error occurred while inserting tablets in SELECT INTO: %s",
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
index 8c48c6a574..d7707926c6 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
@@ -550,10 +550,11 @@ public class QueryExecution implements IQueryExecution {
         // multiple devices
         if (statusCode == TSStatusCode.SUCCESS_STATUS) {
           List<TSStatus> subStatus = new ArrayList<>();
-          tsstatus.setCode(TSStatusCode.NEED_REDIRECTION.getStatusCode());
+          tsstatus.setCode(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode());
           for (TEndPoint endPoint : redirectNodeList) {
             subStatus.add(
-                StatusUtils.getStatus(TSStatusCode.NEED_REDIRECTION).setRedirectNode(endPoint));
+                StatusUtils.getStatus(TSStatusCode.REDIRECTION_RECOMMEND)
+                    .setRedirectNode(endPoint));
           }
           tsstatus.setSubStatus(subStatus);
         }
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index 8f3f0da402..ec40b9e9d0 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -994,13 +994,13 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
           if (e.getType() == TTransportException.TIMED_OUT
               || e.getCause() instanceof SocketTimeoutException) {
             // time out mainly caused by slow execution, wait until
-            tsStatus = RpcUtils.getStatus(TSStatusCode.STILL_EXECUTING_STATUS);
+            tsStatus = RpcUtils.getStatus(TSStatusCode.OVERLAP_WITH_EXISTING_TASK);
           } else {
             throw e;
           }
         }
         // keep waiting until task ends
-      } while (TSStatusCode.STILL_EXECUTING_STATUS.getStatusCode() == tsStatus.getCode());
+      } while (TSStatusCode.OVERLAP_WITH_EXISTING_TASK.getStatusCode() == tsStatus.getCode());
 
       if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) {
         LOGGER.error(
@@ -1078,13 +1078,13 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
           if (e.getType() == TTransportException.TIMED_OUT
               || e.getCause() instanceof SocketTimeoutException) {
             // time out mainly caused by slow execution, wait until
-            tsStatus = RpcUtils.getStatus(TSStatusCode.STILL_EXECUTING_STATUS);
+            tsStatus = RpcUtils.getStatus(TSStatusCode.OVERLAP_WITH_EXISTING_TASK);
           } else {
             throw e;
           }
         }
         // keep waiting until task ends
-      } while (TSStatusCode.STILL_EXECUTING_STATUS.getStatusCode() == tsStatus.getCode());
+      } while (TSStatusCode.OVERLAP_WITH_EXISTING_TASK.getStatusCode() == tsStatus.getCode());
 
       if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) {
         LOGGER.error(
@@ -1294,13 +1294,13 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
           if (e.getType() == TTransportException.TIMED_OUT
               || e.getCause() instanceof SocketTimeoutException) {
             // time out mainly caused by slow execution, wait until
-            tsStatus = RpcUtils.getStatus(TSStatusCode.STILL_EXECUTING_STATUS);
+            tsStatus = RpcUtils.getStatus(TSStatusCode.OVERLAP_WITH_EXISTING_TASK);
           } else {
             throw e;
           }
         }
         // keep waiting until task ends
-      } while (TSStatusCode.STILL_EXECUTING_STATUS.getStatusCode() == tsStatus.getCode());
+      } while (TSStatusCode.OVERLAP_WITH_EXISTING_TASK.getStatusCode() == tsStatus.getCode());
 
       if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) {
         LOGGER.error(
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/LocalExecutionPlanner.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/LocalExecutionPlanner.java
index 2121d1547e..a08f9af268 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/LocalExecutionPlanner.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/LocalExecutionPlanner.java
@@ -130,7 +130,7 @@ public class LocalExecutionPlanner {
             String.format(
                 "There is not enough memory to execute current fragment instance, current remaining free memory is %d, estimated memory usage for current fragment instance is %d",
                 freeMemoryForOperators, estimatedMemorySize),
-            TSStatusCode.MEMORY_NOT_ENOUGH.getStatusCode());
+            TSStatusCode.MPP_MEMORY_NOT_ENOUGH.getStatusCode());
       } else {
         freeMemoryForOperators -= estimatedMemorySize;
         LOGGER.debug(
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneScheduler.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneScheduler.java
index 698dff38cc..ebceb0e10b 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneScheduler.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneScheduler.java
@@ -132,7 +132,7 @@ public class StandaloneScheduler implements IScheduler {
       case WRITE:
         // reject non-query operations when system is read-only
         if (CommonDescriptor.getInstance().getConfig().isReadOnly()) {
-          TSStatus failedStatus = new TSStatus(TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+          TSStatus failedStatus = new TSStatus(TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
           failedStatus.setMessage("Fail to do non-query operations because system is read-only.");
           stateMachine.transitionToFailed(failedStatus);
           return;
diff --git a/server/src/main/java/org/apache/iotdb/db/protocol/rest/filter/AuthorizationFilter.java b/server/src/main/java/org/apache/iotdb/db/protocol/rest/filter/AuthorizationFilter.java
index f9c774fa2a..58cf062275 100644
--- a/server/src/main/java/org/apache/iotdb/db/protocol/rest/filter/AuthorizationFilter.java
+++ b/server/src/main/java/org/apache/iotdb/db/protocol/rest/filter/AuthorizationFilter.java
@@ -108,8 +108,8 @@ public class AuthorizationFilter implements ContainerRequestFilter {
               .type(MediaType.APPLICATION_JSON)
               .entity(
                   new ExecutionStatus()
-                      .code(TSStatusCode.SYSTEM_CHECK_ERROR.getStatusCode())
-                      .message(TSStatusCode.SYSTEM_CHECK_ERROR.name()))
+                      .code(TSStatusCode.AUTHENTICATION_ERROR.getStatusCode())
+                      .message(TSStatusCode.AUTHENTICATION_ERROR.name()))
               .build();
       containerRequestContext.abortWith(resp);
       return null;
diff --git a/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/GrafanaApiServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/GrafanaApiServiceImpl.java
index 5b8449a211..fbba149e66 100644
--- a/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/GrafanaApiServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/GrafanaApiServiceImpl.java
@@ -125,7 +125,7 @@ public class GrafanaApiServiceImpl extends GrafanaApiService {
               SCHEMA_FETCHER,
               config.getQueryTimeoutThreshold());
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return Response.ok()
             .entity(
                 new ExecutionStatus()
@@ -188,7 +188,7 @@ public class GrafanaApiServiceImpl extends GrafanaApiService {
               SCHEMA_FETCHER,
               config.getQueryTimeoutThreshold());
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return Response.ok()
             .entity(
                 new ExecutionStatus()
@@ -245,7 +245,7 @@ public class GrafanaApiServiceImpl extends GrafanaApiService {
                 SCHEMA_FETCHER,
                 config.getQueryTimeoutThreshold());
         if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-            && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+            && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
           return Response.ok()
               .entity(
                   new ExecutionStatus()
diff --git a/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/RestApiServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/RestApiServiceImpl.java
index 65431a95af..4892e13da7 100644
--- a/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/RestApiServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/RestApiServiceImpl.java
@@ -113,7 +113,7 @@ public class RestApiServiceImpl extends RestApiService {
       return Response.ok()
           .entity(
               (result.status.code == TSStatusCode.SUCCESS_STATUS.getStatusCode()
-                      || result.status.code == TSStatusCode.NEED_REDIRECTION.getStatusCode())
+                      || result.status.code == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode())
                   ? new ExecutionStatus()
                       .code(TSStatusCode.SUCCESS_STATUS.getStatusCode())
                       .message(TSStatusCode.SUCCESS_STATUS.name())
@@ -160,7 +160,7 @@ public class RestApiServiceImpl extends RestApiService {
               SCHEMA_FETCHER,
               config.getQueryTimeoutThreshold());
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return Response.ok()
             .entity(
                 new ExecutionStatus()
@@ -208,7 +208,7 @@ public class RestApiServiceImpl extends RestApiService {
       return Response.ok()
           .entity(
               (result.status.code == TSStatusCode.SUCCESS_STATUS.getStatusCode()
-                      || result.status.code == TSStatusCode.NEED_REDIRECTION.getStatusCode())
+                      || result.status.code == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode())
                   ? new ExecutionStatus()
                       .code(TSStatusCode.SUCCESS_STATUS.getStatusCode())
                       .message(TSStatusCode.SUCCESS_STATUS.name())
diff --git a/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java b/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java
index f7cc96b676..68cc811b6e 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java
@@ -129,7 +129,7 @@ public class SessionManager implements SessionManagerMBean {
       LOGGER.error("Failed to connect to ConfigNode, because ", e);
       openSessionResp
           .sessionId(-1)
-          .setCode(TSStatusCode.AUTHENTICATION_FAILED.getStatusCode())
+          .setCode(TSStatusCode.AUTHENTICATION_ERROR.getStatusCode())
           .setMessage(e.getMessage());
     }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
index 27646db877..43515a61f2 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
@@ -222,7 +222,7 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
               req.getTimeout());
 
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return RpcUtils.getTSExecuteStatementResp(result.status);
       }
 
@@ -1518,7 +1518,7 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
               config.getQueryTimeoutThreshold());
 
       if (executionResult.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && executionResult.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && executionResult.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         resp.setStatus(executionResult.status);
         return resp;
       }
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
index a3e4266ec1..58a77d76a1 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
@@ -879,7 +879,7 @@ public class DataNodeInternalRPCServiceImpl implements IDataNodeRPCService.Iface
               req.getTimeout());
 
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return result.status;
       }
 
@@ -1299,7 +1299,7 @@ public class DataNodeInternalRPCServiceImpl implements IDataNodeRPCService.Iface
       UDFManagementService.getInstance().register(udfInformation, req.jarFile);
       return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
     } catch (Exception e) {
-      return new TSStatus(TSStatusCode.CREATE_FUNCTION_ON_DATANODE_ERROR.getStatusCode())
+      return new TSStatus(TSStatusCode.CREATE_UDF_ON_DATANODE_ERROR.getStatusCode())
           .setMessage(e.getMessage());
     }
   }
@@ -1310,7 +1310,7 @@ public class DataNodeInternalRPCServiceImpl implements IDataNodeRPCService.Iface
       UDFManagementService.getInstance().deregister(req.getFunctionName(), req.isNeedToDeleteJar());
       return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
     } catch (Exception e) {
-      return new TSStatus(TSStatusCode.DROP_FUNCTION_ON_DATANODE_ERROR.getStatusCode())
+      return new TSStatus(TSStatusCode.DROP_UDF_ON_DATANODE_ERROR.getStatusCode())
           .setMessage(e.getMessage());
     }
   }
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeRegionManager.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeRegionManager.java
index 18b56fceb5..0f892bf519 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeRegionManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeRegionManager.java
@@ -128,7 +128,7 @@ public class DataNodeRegionManager {
       }
     } catch (IllegalPathException e1) {
       LOGGER.error("Create Schema Region {} failed because path is illegal.", storageGroup);
-      tsStatus = new TSStatus(TSStatusCode.PATH_ILLEGAL.getStatusCode());
+      tsStatus = new TSStatus(TSStatusCode.ILLEGAL_PATH.getStatusCode());
       tsStatus.setMessage("Create Schema Region failed because storageGroup path is illegal.");
     } catch (MetadataException e2) {
       LOGGER.error("Create Schema Region {} failed because {}", storageGroup, e2.getMessage());
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
index d086f5ba57..b217450312 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
@@ -733,7 +733,7 @@ public class TSServiceImpl implements IClientRPCServiceWithHandler {
         port);
     TSStatus status = new TSStatus();
     status.setRedirectNode(new TEndPoint(ip, port));
-    status.setCode(TSStatusCode.NEED_REDIRECTION.getStatusCode());
+    status.setCode(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode());
     resp.setStatus(status);
     resp.setQueryId(context.getQueryId());
     return resp;
diff --git a/server/src/main/java/org/apache/iotdb/db/tools/WalChecker.java b/server/src/main/java/org/apache/iotdb/db/tools/WalChecker.java
index 724bd75fbc..bc4f9247ab 100644
--- a/server/src/main/java/org/apache/iotdb/db/tools/WalChecker.java
+++ b/server/src/main/java/org/apache/iotdb/db/tools/WalChecker.java
@@ -20,9 +20,9 @@ package org.apache.iotdb.db.tools;
 
 import org.apache.iotdb.commons.exception.IllegalPathException;
 import org.apache.iotdb.commons.file.SystemFileFactory;
-import org.apache.iotdb.db.exception.SystemCheckException;
 import org.apache.iotdb.db.wal.buffer.WALEntry;
 import org.apache.iotdb.db.wal.buffer.WALEntryType;
+import org.apache.iotdb.db.wal.exception.WALException;
 import org.apache.iotdb.db.wal.utils.WALFileUtils;
 
 import org.slf4j.Logger;
@@ -54,13 +54,13 @@ public class WalChecker {
    * check the root wal dir and find the damaged files
    *
    * @return a list of damaged files.
-   * @throws SystemCheckException if the root wal dir does not exist.
+   * @throws WALException if the root wal dir does not exist.
    */
-  public List<File> doCheck() throws SystemCheckException {
+  public List<File> doCheck() throws WALException {
     File walFolderFile = SystemFileFactory.INSTANCE.getFile(walFolder);
     logger.info("Checking folder: {}", walFolderFile.getAbsolutePath());
     if (!walFolderFile.exists() || !walFolderFile.isDirectory()) {
-      throw new SystemCheckException(walFolder);
+      throw new WALException(walFolder);
     }
 
     File[] walNodeFolders = walFolderFile.listFiles(File::isDirectory);
@@ -115,7 +115,7 @@ public class WalChecker {
   }
 
   /** @param args walRootDirectory */
-  public static void main(String[] args) throws SystemCheckException {
+  public static void main(String[] args) throws WALException {
     if (args.length < 1) {
       logger.error("No enough args: require the walRootDirectory");
       return;
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java b/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
index e01a94ab79..782c990c59 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
@@ -80,7 +80,7 @@ public class ErrorHandlingUtils {
     TSStatus status = tryCatchQueryException(e);
     if (status != null) {
       // ignore logging sg not ready exception
-      if (status.getCode() != TSStatusCode.DATABASE_NOT_READY.getStatusCode()) {
+      if (status.getCode() != TSStatusCode.STORAGE_ENGINE_NOT_READY.getStatusCode()) {
         String message =
             String.format(
                 "Status code: %s, Query Statement: %s failed", status.getCode(), operation);
@@ -108,12 +108,12 @@ public class ErrorHandlingUtils {
     Throwable rootCause = getRootCause(e);
     // ignore logging sg not ready exception
     if (rootCause instanceof StorageGroupNotReadyException) {
-      return RpcUtils.getStatus(TSStatusCode.DATABASE_NOT_READY, rootCause.getMessage());
+      return RpcUtils.getStatus(TSStatusCode.STORAGE_ENGINE_NOT_READY, rootCause.getMessage());
     }
 
     Throwable t = e instanceof ExecutionException ? e.getCause() : e;
     if (t instanceof QueryTimeoutRuntimeException) {
-      return RpcUtils.getStatus(TSStatusCode.TIME_OUT, rootCause.getMessage());
+      return RpcUtils.getStatus(TSStatusCode.INTERNAL_REQUEST_TIME_OUT, rootCause.getMessage());
     } else if (t instanceof ParseCancellationException) {
       return RpcUtils.getStatus(
           TSStatusCode.SQL_PARSE_ERROR, INFO_PARSING_SQL_ERROR + rootCause.getMessage());
@@ -159,7 +159,7 @@ public class ErrorHandlingUtils {
       BatchProcessException batchException = (BatchProcessException) e;
       // ignore logging sg not ready exception
       for (TSStatus status : batchException.getFailingStatus()) {
-        if (status.getCode() == TSStatusCode.DATABASE_NOT_READY.getStatusCode()) {
+        if (status.getCode() == TSStatusCode.STORAGE_ENGINE_NOT_READY.getStatusCode()) {
           return RpcUtils.getStatus(Arrays.asList(batchException.getFailingStatus()));
         }
       }
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/exception/WALException.java b/server/src/main/java/org/apache/iotdb/db/wal/exception/WALException.java
index 8f2ccebf21..ac0c666875 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/exception/WALException.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/exception/WALException.java
@@ -23,16 +23,16 @@ import org.apache.iotdb.rpc.TSStatusCode;
 
 public class WALException extends IoTDBException {
   public WALException(Throwable cause) {
-    super(cause, TSStatusCode.WRITE_AHEAD_LOG_ERROR.getStatusCode());
+    super(cause, TSStatusCode.WAL_ERROR.getStatusCode());
     this.initCause(cause);
   }
 
   public WALException(String msg) {
-    super(msg, TSStatusCode.WRITE_AHEAD_LOG_ERROR.getStatusCode());
+    super(msg, TSStatusCode.WAL_ERROR.getStatusCode());
   }
 
   public WALException(String message, Throwable cause) {
-    super(message + cause.getMessage(), TSStatusCode.WRITE_AHEAD_LOG_ERROR.getStatusCode());
+    super(message + cause.getMessage(), TSStatusCode.WAL_ERROR.getStatusCode());
     this.initCause(cause);
   }
 }
diff --git a/server/src/test/java/org/apache/iotdb/db/tools/WalCheckerTest.java b/server/src/test/java/org/apache/iotdb/db/tools/WalCheckerTest.java
index 2019dbe99b..6ada22b36c 100644
--- a/server/src/test/java/org/apache/iotdb/db/tools/WalCheckerTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/tools/WalCheckerTest.java
@@ -21,9 +21,9 @@ package org.apache.iotdb.db.tools;
 
 import org.apache.iotdb.commons.exception.IllegalPathException;
 import org.apache.iotdb.db.constant.TestConstant;
-import org.apache.iotdb.db.exception.SystemCheckException;
 import org.apache.iotdb.db.wal.buffer.WALEntry;
 import org.apache.iotdb.db.wal.buffer.WALInfoEntry;
+import org.apache.iotdb.db.wal.exception.WALException;
 import org.apache.iotdb.db.wal.io.ILogWriter;
 import org.apache.iotdb.db.wal.io.WALFileTest;
 import org.apache.iotdb.db.wal.io.WALWriter;
@@ -53,14 +53,14 @@ public class WalCheckerTest {
     boolean caught = false;
     try {
       checker.doCheck();
-    } catch (SystemCheckException e) {
+    } catch (WALException e) {
       caught = true;
     }
     assertTrue(caught);
   }
 
   @Test
-  public void testEmpty() throws IOException, SystemCheckException {
+  public void testEmpty() throws IOException, WALException {
     File tempRoot = new File(TestConstant.BASE_OUTPUT_PATH.concat("root"));
     tempRoot.mkdir();
 
@@ -73,7 +73,7 @@ public class WalCheckerTest {
   }
 
   @Test
-  public void testNormalCheck() throws IOException, SystemCheckException, IllegalPathException {
+  public void testNormalCheck() throws IOException, WALException, IllegalPathException {
     File tempRoot = new File(TestConstant.BASE_OUTPUT_PATH.concat("wal"));
     tempRoot.mkdir();
 
@@ -112,7 +112,7 @@ public class WalCheckerTest {
   }
 
   @Test
-  public void testAbnormalCheck() throws IOException, SystemCheckException, IllegalPathException {
+  public void testAbnormalCheck() throws IOException, WALException, IllegalPathException {
     File tempRoot = new File(TestConstant.BASE_OUTPUT_PATH.concat("wal"));
     tempRoot.mkdir();
 
@@ -156,7 +156,7 @@ public class WalCheckerTest {
   }
 
   @Test
-  public void testOneDamagedCheck() throws IOException, SystemCheckException {
+  public void testOneDamagedCheck() throws IOException, WALException {
     File tempRoot = new File(TestConstant.BASE_OUTPUT_PATH.concat("wal"));
     tempRoot.mkdir();
 
diff --git a/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java b/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java
index 89c9a21c4a..1c2d64e092 100644
--- a/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java
+++ b/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java
@@ -89,7 +89,7 @@ public class RpcUtils {
       verifySuccess(status.getSubStatus());
       return;
     }
-    if (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+    if (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       return;
     }
     if (status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
@@ -103,7 +103,7 @@ public class RpcUtils {
    * @param status -status
    */
   public static void verifySuccess(InfluxTSStatus status) throws StatementExecutionException {
-    if (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+    if (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       return;
     }
     if (status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
@@ -123,7 +123,7 @@ public class RpcUtils {
       TSStatus status, List<String> devices) throws StatementExecutionException, RedirectException {
     verifySuccess(status);
     if (status.getCode() == TSStatusCode.MULTIPLE_ERROR.getStatusCode()
-        || status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+        || status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       Map<String, TEndPoint> deviceEndPointMap = new HashMap<>();
       List<TSStatus> statusSubStatus = status.getSubStatus();
       for (int i = 0; i < statusSubStatus.size(); i++) {
@@ -141,7 +141,7 @@ public class RpcUtils {
         new StringBuilder().append(TSStatusCode.MULTIPLE_ERROR.getStatusCode()).append(": ");
     for (TSStatus status : statuses) {
       if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && status.getCode() != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && status.getCode() != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         errMsgs.append(status.getMessage()).append("; ");
       }
     }
diff --git a/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java b/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
index 5bb34bc0f0..22a7debc50 100644
--- a/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
+++ b/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
@@ -31,139 +31,144 @@ import java.util.Map;
  */
 public enum TSStatusCode {
   SUCCESS_STATUS(200),
-  STILL_EXECUTING_STATUS(201),
-  INCOMPATIBLE_VERSION(203),
-
-  NODE_DELETE_ERROR(298),
-  ALIAS_ALREADY_EXIST(299),
-  PATH_ALREADY_EXIST(300),
-  METADATA_ERROR(303),
-  PATH_NOT_EXIST(304),
-  OUT_OF_TTL(305),
-  COMPACTION_ERROR(307),
-  SYSTEM_CHECK_ERROR(308),
-  SYNC_CONNECTION_ERROR(310),
-  DATABASE_PROCESS_ERROR(311),
-  STORAGE_ENGINE_ERROR(313),
-  TSFILE_PROCESSOR_ERROR(314),
-  PATH_ILLEGAL(315),
-  LOAD_FILE_ERROR(316),
-  DATABASE_NOT_READY(317),
-  ILLEGAL_PARAMETER(318),
-  ALIGNED_TIMESERIES_ERROR(319),
-  DUPLICATED_TEMPLATE(320),
-  UNDEFINED_TEMPLATE(321),
-  DATABASE_NOT_EXIST(322),
-  CONTINUOUS_QUERY_ERROR(323),
-  NO_TEMPLATE_ON_MNODE(324),
-  DIFFERENT_TEMPLATE(325),
-  TEMPLATE_IS_IN_USE(326),
-  TEMPLATE_INCOMPATIBLE(327),
-  SEGMENT_NOT_FOUND(328),
-  PAGE_OUT_OF_SPACE(329),
-  RECORD_DUPLICATED(330),
-  SEGMENT_OUT_OF_SPACE(331),
-  SCHEMA_FILE_NOT_EXISTS(332),
-  WRITE_AHEAD_LOG_ERROR(333),
-  CREATE_PIPE_SINK_ERROR(334),
-  PIPE_ERROR(335),
-  PIPESERVER_ERROR(336),
-  SERIES_OVERFLOW(337),
-  TIMESERIES_ALREADY_EXIST(338),
-  CREATE_TEMPLATE_ERROR(340),
-  SYNC_FILE_REDIRECTION_ERROR(341),
-  SYNC_FILE_ERROR(342),
-  VERIFY_METADATA_ERROR(343),
-  TIMESERIES_IN_BLACK_LIST(344),
-  OVERSIZE_RECORD(349),
-  SCHEMA_FILE_REDO_LOG_BROKEN(350),
-  TRIGGER_FIRE_ERROR(355),
-  TRIGGER_LOAD_CLASS_ERROR(360),
-  TRIGGER_DOWNLOAD_ERROR(361),
-  CREATE_TRIGGER_INSTANCE_ERROR(362),
-  ACTIVE_TRIGGER_INSTANCE_ERROR(363),
-  DROP_TRIGGER_INSTANCE_ERROR(364),
-  UPDATE_TRIGGER_LOCATION_ERROR(365),
-
-  UDF_LOAD_CLASS_ERROR(370),
-  UDF_DOWNLOAD_ERROR(371),
-  CREATE_FUNCTION_ON_DATANODE_ERROR(372),
-  DROP_FUNCTION_ON_DATANODE_ERROR(373),
-
-  EXECUTE_STATEMENT_ERROR(400),
-  SQL_PARSE_ERROR(401),
-  GENERATE_TIME_ZONE_ERROR(402),
-  SET_TIME_ZONE_ERROR(403),
-  QUERY_NOT_ALLOWED(405),
-  LOGICAL_OPERATOR_ERROR(407),
-  LOGICAL_OPTIMIZE_ERROR(408),
-  UNSUPPORTED_FILL_TYPE(409),
-  QUERY_PROCESS_ERROR(411),
-  WRITE_PROCESS_ERROR(412),
-  WRITE_PROCESS_REJECT(413),
-  SEMANTIC_ERROR(416),
-  LOAD_PIECE_OF_TSFILE_ERROR(417),
-
-  UNSUPPORTED_INDEX_TYPE(422),
-
-  MEMORY_NOT_ENOUGH(423),
-
-  INTERNAL_SERVER_ERROR(500),
-  CLOSE_OPERATION_ERROR(501),
-  READ_ONLY_SYSTEM(502),
-  DISK_SPACE_INSUFFICIENT(503),
-  START_UP_ERROR(504),
-  SHUT_DOWN_ERROR(505),
-  MULTIPLE_ERROR(506),
-  TSBLOCK_SERIALIZE_ERROR(508),
-
-  WRONG_LOGIN_PASSWORD(600),
-  NOT_LOGIN(601),
-  NO_PERMISSION(602),
-  UNINITIALIZED_AUTH_ERROR(603),
-  EXECUTE_PERMISSION_ERROR(604),
-  USER_NOT_EXIST(605),
-  ROLE_NOT_EXIST(606),
-  AUTHENTICATION_FAILED(607),
-  CLEAR_PERMISSION_CACHE_ERROR(608),
-
-  // cluster-related errors
-  TIME_OUT(701),
-  UNSUPPORTED_OPERATION(703),
-  NO_CONNECTION(706),
-  NEED_REDIRECTION(707),
-  ALL_RETRY_ERROR(709),
-  MIGRATE_REGION_ERROR(710),
-  CREATE_REGION_ERROR(711),
-  DELETE_REGION_ERROR(712),
-  PARTITION_CACHE_UPDATE_ERROR(713),
-  DESERIALIZE_PIECE_OF_TSFILE_ERROR(714),
-  CONSENSUS_NOT_INITIALIZED(715),
-
-  // configuration
-  CONFIGURATION_ERROR(800),
-
-  // ConfigNode response
-  DATANODE_ALREADY_REGISTERED(901),
-  DATABASE_ALREADY_EXISTS(903),
-  NO_ENOUGH_DATANODE(904),
-  ERROR_GLOBAL_CONFIG(905),
-  ADD_CONFIGNODE_ERROR(906),
-  REMOVE_CONFIGNODE_ERROR(907),
-  DATANODE_NOT_EXIST(912),
-  DATANODE_STOP_ERROR(917),
-  REGION_LEADER_CHANGE_ERROR(918),
-  REMOVE_DATANODE_ERROR(919),
-  OVERLAP_WITH_EXISTING_TASK(920),
-  NOT_AVAILABLE_REGION_GROUP(921),
-  CREATE_TRIGGER_ERROR(922),
-  DROP_TRIGGER_ERROR(923),
-  REGISTER_REMOVED_DATANODE(925),
-
-  NO_SUCH_CQ(930),
-  CQ_ALREADY_ACTIVE(931),
-  CQ_AlREADY_EXIST(932),
-  CQ_UPDATE_LAST_EXEC_TIME_ERROR(933);
+
+  // System level
+  INCOMPATIBLE_VERSION(201),
+  CONFIGURATION_ERROR(202),
+  START_UP_ERROR(203),
+  SHUT_DOWN_ERROR(204),
+
+  // General Error
+  UNSUPPORTED_OPERATION(300),
+  EXECUTE_STATEMENT_ERROR(301),
+  MULTIPLE_ERROR(302),
+  ILLEGAL_PARAMETER(303),
+  OVERLAP_WITH_EXISTING_TASK(304),
+  INTERNAL_SERVER_ERROR(305),
+
+  // Client,
+  REDIRECTION_RECOMMEND(400),
+
+  // Schema Engine
+  DATABASE_NOT_EXIST(500),
+  DATABASE_ALREADY_EXISTS(501),
+  SERIES_OVERFLOW(502),
+  TIMESERIES_ALREADY_EXIST(503),
+  TIMESERIES_IN_BLACK_LIST(504),
+  ALIAS_ALREADY_EXIST(505),
+  PATH_ALREADY_EXIST(506),
+  METADATA_ERROR(507),
+  PATH_NOT_EXIST(508),
+  ILLEGAL_PATH(509),
+  CREATE_TEMPLATE_ERROR(510),
+  DUPLICATED_TEMPLATE(511),
+  UNDEFINED_TEMPLATE(512),
+  NO_TEMPLATE_ON_MNODE(513),
+  DIFFERENT_TEMPLATE(514),
+  TEMPLATE_IS_IN_USE(515),
+  TEMPLATE_INCOMPATIBLE(516),
+  SEGMENT_NOT_FOUND(517),
+  PAGE_OUT_OF_SPACE(518),
+  RECORD_DUPLICATED(519),
+  SEGMENT_OUT_OF_SPACE(520),
+  SCHEMA_FILE_NOT_EXISTS(521),
+  OVERSIZE_RECORD(522),
+  SCHEMA_FILE_REDO_LOG_BROKEN(523),
+
+  // Storage Engine
+  SYSTEM_READ_ONLY(600),
+  STORAGE_ENGINE_ERROR(601),
+  STORAGE_ENGINE_NOT_READY(602),
+  DATAREGION_PROCESS_ERROR(603),
+  TSFILE_PROCESSOR_ERROR(604),
+  WRITE_PROCESS_ERROR(605),
+  WRITE_PROCESS_REJECT(606),
+  OUT_OF_TTL(607),
+  COMPACTION_ERROR(608),
+  ALIGNED_TIMESERIES_ERROR(609),
+  WAL_ERROR(610),
+  DISK_SPACE_INSUFFICIENT(611),
+
+  // Query Engine
+  SQL_PARSE_ERROR(700),
+  SEMANTIC_ERROR(701),
+  GENERATE_TIME_ZONE_ERROR(702),
+  SET_TIME_ZONE_ERROR(703),
+  QUERY_NOT_ALLOWED(704),
+  LOGICAL_OPERATOR_ERROR(705),
+  LOGICAL_OPTIMIZE_ERROR(706),
+  UNSUPPORTED_FILL_TYPE(707),
+  QUERY_PROCESS_ERROR(708),
+  MPP_MEMORY_NOT_ENOUGH(709),
+  CLOSE_OPERATION_ERROR(710),
+  TSBLOCK_SERIALIZE_ERROR(711),
+  INTERNAL_REQUEST_TIME_OUT(712),
+  INTERNAL_REQUEST_RETRY_ERROR(713),
+
+  // Authentication
+  AUTHENTICATION_ERROR(800),
+  WRONG_LOGIN_PASSWORD(801),
+  NOT_LOGIN(802),
+  NO_PERMISSION(803),
+  UNINITIALIZED_AUTH_ERROR(804),
+  USER_NOT_EXIST(805),
+  ROLE_NOT_EXIST(806),
+  CLEAR_PERMISSION_CACHE_ERROR(807),
+
+  // Partition Error
+  MIGRATE_REGION_ERROR(900),
+  CREATE_REGION_ERROR(901),
+  DELETE_REGION_ERROR(902),
+  PARTITION_CACHE_UPDATE_ERROR(903),
+  CONSENSUS_NOT_INITIALIZED(904),
+  REGION_LEADER_CHANGE_ERROR(905),
+  NO_AVAILABLE_REGION_GROUP(906),
+
+  // Cluster Manager
+  ADD_CONFIGNODE_ERROR(1000),
+  REMOVE_CONFIGNODE_ERROR(1001),
+  DATANODE_ALREADY_REGISTERED(1002),
+  NO_ENOUGH_DATANODE(1003),
+  DATANODE_NOT_EXIST(1004),
+  DATANODE_STOP_ERROR(1005),
+  REMOVE_DATANODE_ERROR(1006),
+  REGISTER_REMOVED_DATANODE(1007),
+  CAN_NOT_CONNECT_DATANODE(1008),
+
+  // Sync, Load TsFile
+  LOAD_FILE_ERROR(1100),
+  LOAD_PIECE_OF_TSFILE_ERROR(1101),
+  DESERIALIZE_PIECE_OF_TSFILE_ERROR(1102),
+  SYNC_CONNECTION_ERROR(1103),
+  SYNC_FILE_REDIRECTION_ERROR(1104),
+  SYNC_FILE_ERROR(1105),
+  CREATE_PIPE_SINK_ERROR(1106),
+  PIPE_ERROR(1107),
+  PIPESERVER_ERROR(1108),
+  VERIFY_METADATA_ERROR(1109),
+
+  // UDF
+  UDF_LOAD_CLASS_ERROR(1200),
+  UDF_DOWNLOAD_ERROR(1201),
+  CREATE_UDF_ON_DATANODE_ERROR(1202),
+  DROP_UDF_ON_DATANODE_ERROR(1203),
+
+  // Trigger
+  CREATE_TRIGGER_ERROR(1300),
+  DROP_TRIGGER_ERROR(1301),
+  TRIGGER_FIRE_ERROR(1302),
+  TRIGGER_LOAD_CLASS_ERROR(1303),
+  TRIGGER_DOWNLOAD_ERROR(1304),
+  CREATE_TRIGGER_INSTANCE_ERROR(1305),
+  ACTIVE_TRIGGER_INSTANCE_ERROR(1306),
+  DROP_TRIGGER_INSTANCE_ERROR(1307),
+  UPDATE_TRIGGER_LOCATION_ERROR(1308),
+
+  // Continuous Query
+  NO_SUCH_CQ(1400),
+  CQ_ALREADY_ACTIVE(1401),
+  CQ_AlREADY_EXIST(1402),
+  CQ_UPDATE_LAST_EXEC_TIME_ERROR(1403);
 
   private final int statusCode;