This is an automated email from the ASF dual-hosted git repository. jackietien pushed a commit to branch rc/2.0.5 in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 82100d1dde762a778537b4007f5004b93dc1228f Author: Zhenyu Luo <[email protected]> AuthorDate: Mon Aug 4 09:48:16 2025 +0800 Pipe: Fixed the issue that frequent logins on the receiving end caused indicator leaks (#16076) * Pipe: Fixed the issue that frequent logins on the receiving end caused indicator leaks * fix * fix * spotless (cherry picked from commit eed90ce5f198c3e017aaabce5150908c4d1d8d8a) --- .../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 c899eca9435..33a23c459b4 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 @@ -936,15 +936,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.getMessage()); + } + + return AuthorityChecker.checkUser(username, password); } private TSStatus executeStatementForTableModel(
