This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch login-restart
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/login-restart by this push:
new faa095d690f wb
faa095d690f is described below
commit faa095d690f7b5e43a6dcb859acda76b962067e7
Author: Caideyipi <[email protected]>
AuthorDate: Tue Feb 10 17:57:27 2026 +0800
wb
---
.../iotdb/db/pipe/sink/protocol/writeback/WriteBackSink.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/writeback/WriteBackSink.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/writeback/WriteBackSink.java
index 9d476c54294..94dc94022c5 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/writeback/WriteBackSink.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/writeback/WriteBackSink.java
@@ -83,6 +83,7 @@ import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.CONNECTOR_IOTDB_CLI_HOSTNAME;
+import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.CONNECTOR_IOTDB_PASSWORD_KEY;
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.CONNECTOR_IOTDB_SKIP_IF_NO_PRIVILEGES;
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.CONNECTOR_IOTDB_USERNAME_KEY;
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.CONNECTOR_IOTDB_USER_ID;
@@ -91,6 +92,7 @@ import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.CON
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.CONNECTOR_USE_EVENT_USER_NAME_DEFAULT_VALUE;
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.CONNECTOR_USE_EVENT_USER_NAME_KEY;
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.SINK_IOTDB_CLI_HOSTNAME;
+import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.SINK_IOTDB_PASSWORD_KEY;
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.SINK_IOTDB_USERNAME_KEY;
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.SINK_IOTDB_USER_ID;
import static
org.apache.iotdb.commons.pipe.config.constant.PipeSinkConstant.SINK_IOTDB_USER_KEY;
@@ -156,6 +158,8 @@ public class WriteBackSink implements PipeConnector {
SINK_IOTDB_USER_KEY,
CONNECTOR_IOTDB_USERNAME_KEY,
SINK_IOTDB_USERNAME_KEY);
+ String passwordString =
+ parameters.getStringByKeys(CONNECTOR_IOTDB_PASSWORD_KEY,
SINK_IOTDB_PASSWORD_KEY);
String cliHostnameString =
parameters.getStringByKeys(CONNECTOR_IOTDB_CLI_HOSTNAME,
SINK_IOTDB_CLI_HOSTNAME);
userEntity = new UserEntity(Long.parseLong(userIdString), usernameString,
cliHostnameString);
@@ -190,6 +194,13 @@ public class WriteBackSink implements PipeConnector {
if (SESSION_MANAGER.getCurrSession() == null) {
SESSION_MANAGER.registerSession(session);
+ SESSION_MANAGER.login(
+ session,
+ usernameString,
+ passwordString,
+ ZoneId.systemDefault().toString(),
+ SessionManager.CURRENT_RPC_VERSION,
+ IoTDBConstant.ClientVersion.V_1_0);
}
}