You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by xi...@apache.org on 2021/03/02 04:12:03 UTC

[iotdb] branch fixQueryInfoNull created (now d718827)

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

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


      at d718827  fix NPE bug in QueryTimeManager

This branch includes the following new commits:

     new d718827  fix NPE bug in QueryTimeManager

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: fix NPE bug in QueryTimeManager

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

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

commit d71882781a2fc0a3eb358069d03d1546acaa03a3
Author: Alima777 <wx...@gmail.com>
AuthorDate: Tue Mar 2 12:11:27 2021 +0800

    fix NPE bug in QueryTimeManager
---
 .../java/org/apache/iotdb/db/query/control/QueryTimeManager.java     | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/query/control/QueryTimeManager.java b/server/src/main/java/org/apache/iotdb/db/query/control/QueryTimeManager.java
index bfe2c70..4ce7204 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/control/QueryTimeManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/control/QueryTimeManager.java
@@ -24,7 +24,6 @@ import org.apache.iotdb.db.conf.IoTDBDescriptor;
 import org.apache.iotdb.db.exception.query.QueryTimeoutRuntimeException;
 import org.apache.iotdb.db.service.IService;
 import org.apache.iotdb.db.service.ServiceType;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -102,8 +101,8 @@ public class QueryTimeManager implements IService {
   }
 
   public static void checkQueryAlive(long queryId) {
-    if (getInstance().queryInfoMap.get(queryId) != null
-        && getInstance().queryInfoMap.get(queryId).isInterrupted()) {
+    QueryInfo queryInfo = getInstance().queryInfoMap.get(queryId);
+    if (queryInfo != null && queryInfo.isInterrupted()) {
       if (getInstance().unRegisterQuery(queryId).get()) {
         throw new QueryTimeoutRuntimeException(
             QueryTimeoutRuntimeException.TIMEOUT_EXCEPTION_MESSAGE);