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/02/28 02:05:39 UTC
(iotdb) branch session_nodeurl_shuffle created (now 9a49203fa09)
This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a change to branch session_nodeurl_shuffle
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 9a49203fa09 enhance
This branch includes the following new commits:
new 9a49203fa09 enhance
The 1 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/01: enhance
Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch session_nodeurl_shuffle
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 9a49203fa0987d6b2b8bdfc52779ce0ddf635947
Author: OneSizeFitQuorum <ta...@apache.org>
AuthorDate: Fri Feb 28 10:05:25 2025 +0800
enhance
Signed-off-by: OneSizeFitQuorum <ta...@apache.org>
---
.../session/src/main/java/org/apache/iotdb/session/Session.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java
index 6908cad0632..357203563c7 100644
--- a/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java
+++ b/iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java
@@ -425,6 +425,7 @@ public class Session implements ISession {
if (nodeUrls.isEmpty()) {
throw new IllegalArgumentException("nodeUrls shouldn't be empty.");
}
+ Collections.shuffle(nodeUrls);
this.nodeUrls = nodeUrls;
this.username = username;
this.password = password;
@@ -441,6 +442,7 @@ public class Session implements ISession {
if (builder.nodeUrls.isEmpty()) {
throw new IllegalArgumentException("nodeUrls shouldn't be empty.");
}
+ Collections.shuffle(builder.nodeUrls);
this.nodeUrls = builder.nodeUrls;
this.enableQueryRedirection = true;
} else {