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

jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new a3d7da5a446 RestAPI remove getCurrSessionAndUpdateIdleTime, because 
RestAPI is not a long connection
a3d7da5a446 is described below

commit a3d7da5a446b192dca41f27ccc8e97e39655ef98
Author: CritasWang <[email protected]>
AuthorDate: Fri Aug 1 18:07:53 2025 +0800

    RestAPI remove getCurrSessionAndUpdateIdleTime, because RestAPI is not a 
long connection
---
 .../iotdb/db/protocol/rest/table/v1/impl/RestApiServiceImpl.java    | 6 +++---
 .../apache/iotdb/db/protocol/rest/v1/impl/RestApiServiceImpl.java   | 2 +-
 .../apache/iotdb/db/protocol/rest/v2/impl/RestApiServiceImpl.java   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/table/v1/impl/RestApiServiceImpl.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/table/v1/impl/RestApiServiceImpl.java
index 8d2543b51df..ec0237f13ea 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/table/v1/impl/RestApiServiceImpl.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/table/v1/impl/RestApiServiceImpl.java
@@ -123,7 +123,7 @@ public class RestApiServiceImpl extends RestApiService {
     Statement statement = null;
     long startTime = System.nanoTime();
     try {
-      IClientSession clientSession = 
SESSION_MANAGER.getCurrSessionAndUpdateIdleTime();
+      IClientSession clientSession = SESSION_MANAGER.getCurrSession();
       statement = createStatement(sql, clientSession, relationSqlParser);
       Response resp = validateStatement(statement, true);
       if (resp != null) {
@@ -154,7 +154,7 @@ public class RestApiServiceImpl extends RestApiService {
       
RequestValidationHandler.validateInsertTabletRequest(insertTabletRequest);
       insertTabletStatement =
           
StatementConstructionHandler.constructInsertTabletStatement(insertTabletRequest);
-      IClientSession clientSession = 
SESSION_MANAGER.getCurrSessionAndUpdateIdleTime();
+      IClientSession clientSession = SESSION_MANAGER.getCurrSession();
       clientSession.setDatabaseName(insertTabletRequest.getDatabase());
       clientSession.setSqlDialect(IClientSession.SqlDialect.TABLE);
       queryId = SESSION_MANAGER.requestQueryId();
@@ -196,7 +196,7 @@ public class RestApiServiceImpl extends RestApiService {
     Statement statement = null;
     long startTime = System.nanoTime();
     try {
-      IClientSession clientSession = 
SESSION_MANAGER.getCurrSessionAndUpdateIdleTime();
+      IClientSession clientSession = SESSION_MANAGER.getCurrSession();
       statement = createStatement(sql, clientSession, relationSqlParser);
       Response resp = validateStatement(statement, false);
       if (resp != null) {
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/impl/RestApiServiceImpl.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/impl/RestApiServiceImpl.java
index d7491b6612c..6982fb0b533 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/impl/RestApiServiceImpl.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/impl/RestApiServiceImpl.java
@@ -112,7 +112,7 @@ public class RestApiServiceImpl extends RestApiService {
             COORDINATOR.executeForTableModel(
                 ((CreateTableViewStatement) statement).getCreateTableView(),
                 new SqlParser(),
-                SESSION_MANAGER.getCurrSessionAndUpdateIdleTime(),
+                SESSION_MANAGER.getCurrSession(),
                 queryId,
                 
SESSION_MANAGER.getSessionInfo(SESSION_MANAGER.getCurrSession()),
                 sql.getSql(),
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/impl/RestApiServiceImpl.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/impl/RestApiServiceImpl.java
index e9ac41f833d..efdabe0f793 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/impl/RestApiServiceImpl.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v2/impl/RestApiServiceImpl.java
@@ -129,7 +129,7 @@ public class RestApiServiceImpl extends RestApiService {
       }
       // Check cache first
       if (!TableDeviceSchemaCache.getInstance().getLastCache(resultMap)) {
-        IClientSession clientSession = 
SESSION_MANAGER.getCurrSessionAndUpdateIdleTime();
+        IClientSession clientSession = SESSION_MANAGER.getCurrSession();
         TSLastDataQueryReq tsLastDataQueryReq =
             FastLastHandler.createTSLastDataQueryReq(clientSession, 
prefixPathList);
         statement = StatementGenerator.createStatement(tsLastDataQueryReq);

Reply via email to