You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2025/03/19 12:47:03 UTC

(iotdb) branch dev/1.3 updated: [To dev/1.3] Enhance remove unexisted datanode error message #15140

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

tanxinyu pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/dev/1.3 by this push:
     new 85d435b707a [To dev/1.3] Enhance remove unexisted datanode error message #15140
85d435b707a is described below

commit 85d435b707a8528972770169a9f5c8c2ffcff83a
Author: Xiangpeng Hu <65...@users.noreply.github.com>
AuthorDate: Wed Mar 19 20:46:57 2025 +0800

    [To dev/1.3] Enhance remove unexisted datanode error message #15140
---
 .../plan/execution/config/executor/ClusterConfigTaskExecutor.java | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index 4dc3a757e2b..d2b5d0bbe77 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -2692,6 +2692,14 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
         nodeIds.removeAll(invalidNodeIds);
       }
 
+      if (nodeIds.size() != 1) {
+        LOGGER.error(
+            "The DataNode to be removed is not in the cluster, or the input format is incorrect.");
+        future.setException(
+            new IOException(
+                "The DataNode to be removed is not in the cluster, or the input format is incorrect."));
+      }
+
       LOGGER.info("Starting to remove DataNode with nodeIds: {}", nodeIds);
 
       final Set<Integer> finalNodeIds = nodeIds;