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 2022/05/27 10:14:02 UTC
[iotdb] 01/01: [IOTDB-3129] Fix NPE bug while showing a non-exists timeseries
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch FixNPEBug
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit b145d4cd913dc39fc76ab5328d204aec474d3036
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Fri May 27 18:13:27 2022 +0800
[IOTDB-3129] Fix NPE bug while showing a non-exists timeseries
---
.../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());