This is an automated email from the ASF dual-hosted git repository. liyuheng pushed a commit to branch lyh/improve-remove-region in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 38dd3551c8754a7cfba003fe798ef752666148be Author: liyuheng <[email protected]> AuthorDate: Mon Jun 16 14:47:56 2025 +0800 save --- .../java/org/apache/iotdb/confignode/manager/ProcedureManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java index e257ff5669c..a97645244c2 100644 --- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java +++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java @@ -161,6 +161,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import javax.annotation.Nonnull; +import javax.annotation.Nullable; import java.io.IOException; import java.nio.ByteBuffer; @@ -837,14 +838,13 @@ public class ProcedureManager { private TSStatus checkRemoveRegion( TRemoveRegionReq req, TConsensusGroupId regionId, - TDataNodeLocation targetDataNode, + @Nullable TDataNodeLocation targetDataNode, TDataNodeLocation coordinator) { String failMessage = regionOperationCommonCheck( regionId, targetDataNode, Arrays.asList( - new Pair<>("Target DataNode", targetDataNode), new Pair<>("Coordinator", coordinator)), req.getModel()); @@ -855,7 +855,7 @@ public class ProcedureManager { .getDataNodeLocationsSize() == 1) { failMessage = String.format("%s only has 1 replica, it cannot be removed", regionId); - } else if (configManager + } else if (targetDataNode != null && configManager .getPartitionManager() .getAllReplicaSets(targetDataNode.getDataNodeId()) .stream()
