You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2020/11/11 09:54:15 UTC

[iotdb] branch TY400Bug created (now 189939e)

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

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


      at 189939e  add more log

This branch includes the following new commits:

     new 189939e  add more log

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: add more log

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 189939e7d9bd36e60d18da577abbfeb65f3a5641
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Wed Nov 11 17:48:22 2020 +0800

    add more log
---
 .../src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
index 0d2ab43..7189711 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
@@ -289,6 +289,7 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
       Set<Long> queryIds = statementId2QueryId.getOrDefault(statementId, Collections.emptySet());
       for (long queryId : queryIds) {
         try {
+          logger.info("QueryId: " + queryId + " released because of session is closed");
           releaseQueryResource(queryId);
         } catch (StorageEngineException e) {
           // release as many as resources as possible, so do not break as soon as one exception is
@@ -333,11 +334,13 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
         Set<Long> queryIdSet = statementId2QueryId.remove(stmtId);
         if (queryIdSet != null) {
           for (long queryId : queryIdSet) {
+            logger.info("QueryId: " + queryId + " released because of statement is closed");
             releaseQueryResource(queryId);
           }
         }
       } else {
         // ResultSet close
+        logger.info("QueryId: " + req.queryId + " released because of ResultSet is closed");
         releaseQueryResource(req.queryId);
       }
 
@@ -744,6 +747,7 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
       }
       if (queryId != -1) {
         try {
+          logger.info("QueryId: " + queryId + " released because of error happened while querying");
           releaseQueryResource(queryId);
         } catch (StorageEngineException ex) {
           logger.error("Error happened while releasing query resource: ", ex);
@@ -983,6 +987,7 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
       }
 
       if (!queryId2DataSet.containsKey(req.queryId)) {
+        logger.error("The queryId: " + req.queryId + " does not have corresponding dataset.");
         return RpcUtils.getTSFetchResultsResp(
             RpcUtils.getStatus(TSStatusCode.EXECUTE_STATEMENT_ERROR, "Has not executed query"));
       }
@@ -993,6 +998,7 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
             fillRpcReturnData(req.fetchSize, queryDataSet, sessionIdUsernameMap.get(req.sessionId));
         boolean hasResultSet = result.bufferForTime().limit() != 0;
         if (!hasResultSet) {
+          logger.info("QueryId: " + req.queryId + " released because of no align remaining data");
           releaseQueryResource(req.queryId);
         }
         TSFetchResultsResp resp = RpcUtils.getTSFetchResultsResp(TSStatusCode.SUCCESS_STATUS);
@@ -1012,7 +1018,8 @@ public class TSServiceImpl implements TSIService.Iface, ServerContext {
           }
         }
         if (!hasResultSet) {
-          queryId2DataSet.remove(req.queryId);
+          logger.info("QueryId: " + req.queryId + " released because of no nonAlign remaining data");
+          releaseQueryResource(req.queryId);
         }
         TSFetchResultsResp resp = RpcUtils.getTSFetchResultsResp(TSStatusCode.SUCCESS_STATUS);
         resp.setHasResultSet(hasResultSet);