You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by sh...@apache.org on 2026/04/08 09:20:47 UTC

(iotdb) branch fixIT0408-1.3 created (now 83ac944046b)

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

shuwenwei pushed a change to branch fixIT0408-1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 83ac944046b fix

This branch includes the following new commits:

     new 26b6b4eb5be fix AbstractEnv.ensureNodeStatus
     new 83ac944046b fix

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(iotdb) 01/02: fix AbstractEnv.ensureNodeStatus

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuwenwei pushed a commit to branch fixIT0408-1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 26b6b4eb5bec4d88f0865c1921373c5de9bb637c
Author: shuwenwei <s1...@gmail.com>
AuthorDate: Wed Apr 8 17:01:05 2026 +0800

    fix AbstractEnv.ensureNodeStatus
---
 .../iotdb/it/env/cluster/env/AbstractEnv.java      | 24 ++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
index 60ff77aa03c..3813a2890b1 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
@@ -57,6 +57,8 @@ import org.apache.iotdb.session.Session;
 import org.apache.iotdb.session.pool.SessionPool;
 
 import org.apache.thrift.TException;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransportException;
 import org.slf4j.Logger;
 
 import java.io.File;
@@ -1119,7 +1121,7 @@ public abstract class AbstractEnv implements BaseEnv {
 
   @Override
   public void ensureNodeStatus(
-      final List<BaseNodeWrapper> nodes, final List<NodeStatus> targetStatus)
+      final List<BaseNodeWrapper> nodes, final List<NodeStatus> targetStatusList)
       throws IllegalStateException {
     Throwable lastException = null;
     for (int i = 0; i < retryCount; i++) {
@@ -1147,7 +1149,9 @@ public abstract class AbstractEnv implements BaseEnv {
                             + node.getClientRpcEndPoint().getPort(),
                         node.getDataNodeId()));
         for (int j = 0; j < nodes.size(); j++) {
-          final String endpoint = nodes.get(j).getIpAndPortString();
+          BaseNodeWrapper nodeWrapper = nodes.get(j);
+          String ipAndPortString = nodeWrapper.getIpAndPortString();
+          final String endpoint = ipAndPortString;
           if (!nodeIds.containsKey(endpoint)) {
             // Node not exist
             // Notice: Never modify this line, since the NodeLocation might be modified in IT
@@ -1155,12 +1159,24 @@ public abstract class AbstractEnv implements BaseEnv {
             continue;
           }
           final String status = showClusterResp.getNodeStatus().get(nodeIds.get(endpoint));
-          if (!targetStatus.get(j).getStatus().equals(status)) {
+          final NodeStatus targetStatus = targetStatusList.get(j);
+          if (!targetStatus.getStatus().equals(status)) {
             // Error status
             errorMessages.add(
                 String.format(
                     "Node %s is in status %s, but expected %s",
-                    endpoint, status, targetStatus.get(j)));
+                    endpoint, status, targetStatusList.get(j)));
+            continue;
+          }
+          if (nodeWrapper instanceof DataNodeWrapper && targetStatus.equals(NodeStatus.Running)) {
+            final String[] ipPort = nodeWrapper.getIpAndPortString().split(":");
+            final String ip = ipPort[0];
+            final int port = Integer.parseInt(ipPort[1]);
+            try (TSocket socket = new TSocket(ip, port)) {
+              socket.open();
+            } catch (final TTransportException e) {
+              errorMessages.add(e.getMessage());
+            }
           }
         }
         if (errorMessages.isEmpty()) {


(iotdb) 02/02: fix

Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

shuwenwei pushed a commit to branch fixIT0408-1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 83ac944046bcfc016487a7e93204bfbe2bd0db37
Author: shuwenwei <s1...@gmail.com>
AuthorDate: Wed Apr 8 17:07:25 2026 +0800

    fix
---
 .../java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
index 3813a2890b1..07b7364d004 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/cluster/env/AbstractEnv.java
@@ -56,6 +56,7 @@ import org.apache.iotdb.rpc.TSStatusCode;
 import org.apache.iotdb.session.Session;
 import org.apache.iotdb.session.pool.SessionPool;
 
+import org.apache.thrift.TConfiguration;
 import org.apache.thrift.TException;
 import org.apache.thrift.transport.TSocket;
 import org.apache.thrift.transport.TTransportException;
@@ -1172,10 +1173,13 @@ public abstract class AbstractEnv implements BaseEnv {
             final String[] ipPort = nodeWrapper.getIpAndPortString().split(":");
             final String ip = ipPort[0];
             final int port = Integer.parseInt(ipPort[1]);
-            try (TSocket socket = new TSocket(ip, port)) {
+            try (TSocket socket = new TSocket(new TConfiguration(), ip, port, 1000)) {
               socket.open();
             } catch (final TTransportException e) {
-              errorMessages.add(e.getMessage());
+              errorMessages.add(
+                  String.format(
+                      "DataNode %s is not reachable: %s",
+                      nodeWrapper.getIpAndPortString(), e.getMessage()));
             }
           }
         }