This is an automated email from the ASF dual-hosted git repository.
haonan 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 8675ccb7ce [IOTDB-3129] Fix NPE bug while showing a non-exists
timeseries (#6050)
8675ccb7ce is described below
commit 8675ccb7ce14fb5cb059bc7e1b3c6a064e51c1aa
Author: Jackie Tien <[email protected]>
AuthorDate: Fri May 27 19:50:16 2022 +0800
[IOTDB-3129] Fix NPE bug while showing a non-exists timeseries (#6050)
---
.../java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
index 868e506dba..254b38f93a 100644
---
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
+++
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
@@ -275,7 +275,11 @@ public class QueryExecution implements IQueryExecution {
}
ListenableFuture<Void> blocked = resultHandle.isBlocked();
blocked.get();
- return Optional.of(resultHandle.receive());
+ if (!resultHandle.isFinished()) {
+ return Optional.of(resultHandle.receive());
+ } else {
+ return Optional.empty();
+ }
} catch (ExecutionException | CancellationException e) {
stateMachine.transitionToFailed(e);
throwIfUnchecked(e.getCause());