133tosakarin commented on code in PR #13178:
URL: https://github.com/apache/iotdb/pull/13178#discussion_r1719325857


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/region/RemoveRegionPeerProcedure.java:
##########
@@ -68,12 +69,25 @@ public RemoveRegionPeerProcedure(
       TConsensusGroupId consensusGroupId,
       TDataNodeLocation coordinator,
       TDataNodeLocation targetDataNode) {
-    super();
     this.consensusGroupId = consensusGroupId;
     this.coordinator = coordinator;
     this.targetDataNode = targetDataNode;
   }
 
+  private void handleTransferLeader(RegionMaintainHandler handler)
+      throws ProcedureException, InterruptedException {
+    LOGGER.info(
+        "[pid{}][RemoveRegion] started, region {} will be removed from 
DataNode {}.",
+        getProcId(),
+        consensusGroupId.getId(),
+        targetDataNode.getDataNodeId());
+    handler.forceUpdateRegionCache(consensusGroupId, targetDataNode, 
RegionStatus.Removing);
+    List<TDataNodeLocation> excludeDataNode = new ArrayList<>();
+    excludeDataNode.add(targetDataNode);
+    excludeDataNode.add(coordinator);
+    handler.transferRegionLeader(consensusGroupId, targetDataNode, 
excludeDataNode);

Review Comment:
   Then I'll change it again.



-- 
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