liyuheng55555 commented on code in PR #14634:
URL: https://github.com/apache/iotdb/pull/14634#discussion_r1914604507


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java:
##########
@@ -760,23 +727,179 @@ private TSStatus checkRegionMigrate(
           String.format(
               "Submit RegionMigrateProcedure failed, because the target 
DataNode %s already contains Region %s",
               migrateRegionReq.getToId(), migrateRegionReq.getRegionId());
-    } else if (!configManager
-        .getNodeManager()
-        .filterDataNodeThroughStatus(NodeStatus.Running)
+    }
+
+    if (failMessage != null) {
+      LOGGER.warn(failMessage);
+      TSStatus failStatus = new 
TSStatus(TSStatusCode.MIGRATE_REGION_ERROR.getStatusCode());
+      failStatus.setMessage(failMessage);
+      return failStatus;
+    }
+    return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
+  }
+
+  private TSStatus checkReconstructRegion(
+      TReconstructRegionReq req,
+      TConsensusGroupId regionId,
+      TDataNodeLocation targetDataNode,
+      TDataNodeLocation coordinator) {
+    String failMessage =
+        regionOperationCommonCheck(
+            regionId,
+            targetDataNode,
+            Arrays.asList(
+                new Pair<>("Target DataNode", targetDataNode),

Review Comment:
   Those string is only used for print log, and I think maybe extract them to 
variable won't help so much...



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

To unsubscribe, e-mail: [email protected]

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

Reply via email to