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

justinchen 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 6de644ea4fe [To dev/1.3] Pipe: Fixed the issue that frequent logins on 
the receiving end caused indicator leaks #16076 (#16085)
6de644ea4fe is described below

commit 6de644ea4fe9d4d7aae9b09f8a2d6631f2250fcd
Author: Zhenyu Luo <[email protected]>
AuthorDate: Mon Aug 4 10:30:56 2025 +0800

    [To dev/1.3] Pipe: Fixed the issue that frequent logins on the receiving 
end caused indicator leaks #16076 (#16085)
    
    * Pipe: Fixed the issue that frequent logins on the receiving end caused 
indicator leaks
    
    * fix
    
    * spotless
    
    * spotless
    
    * spotless
    
    * spotless
---
 .../protocol/thrift/IoTDBDataNodeReceiver.java     | 24 ++++++++++++++--------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java
index 04f5984d91a..b70225a83e8 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/protocol/thrift/IoTDBDataNodeReceiver.java
@@ -772,15 +772,21 @@ public class IoTDBDataNodeReceiver extends 
IoTDBFileReceiver {
 
   @Override
   protected TSStatus login() {
-    final BasicOpenSessionResp openSessionResp =
-        SESSION_MANAGER.login(
-            SESSION_MANAGER.getCurrSession(),
-            username,
-            password,
-            ZoneId.systemDefault().toString(),
-            SessionManager.CURRENT_RPC_VERSION,
-            IoTDBConstant.ClientVersion.V_1_0);
-    return RpcUtils.getStatus(openSessionResp.getCode(), 
openSessionResp.getMessage());
+    final IClientSession session = SESSION_MANAGER.getCurrSession();
+
+    if (session != null && !session.isLogin()) {
+      final BasicOpenSessionResp openSessionResp =
+          SESSION_MANAGER.login(
+              session,
+              username,
+              password,
+              ZoneId.systemDefault().toString(),
+              SessionManager.CURRENT_RPC_VERSION,
+              IoTDBConstant.ClientVersion.V_1_0);
+      return RpcUtils.getStatus(openSessionResp.getCode(), 
openSessionResp.message);
+    }
+
+    return AuthorityChecker.checkUser(username, password);
   }
 
   @Override

Reply via email to