jixuan1989 commented on a change in pull request #2436:
URL: https://github.com/apache/iotdb/pull/2436#discussion_r553298901



##########
File path: server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java
##########
@@ -773,24 +649,8 @@ private TSExecuteStatementResp 
internalExecuteQueryStatement(String statement,
 
       return resp;
     } catch (Exception e) {
-      if (e instanceof NullPointerException) {
-        logger.error("{}: Internal server error: ", 
IoTDBConstant.GLOBAL_DB_NAME, e);
-      } else {
-        logger.warn("{}: Internal server error: ", 
IoTDBConstant.GLOBAL_DB_NAME, e);
-      }
-      if (queryId != -1) {
-        try {
-          releaseQueryResource(queryId);
-        } catch (StorageEngineException ex) {
-          logger.warn("Error happened while releasing query resource: ", ex);
-        }
-      }
-      Throwable cause = e;
-      while (cause.getCause() != null) {
-        cause = cause.getCause();
-      }
-      return RpcUtils
-          .getTSExecuteStatementResp(TSStatusCode.INTERNAL_SERVER_ERROR, 
cause.getMessage());
+      releaseQueryResourceNoExceptions(queryId);

Review comment:
       why? 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to