This is an automated email from the ASF dual-hosted git repository.
jackietien 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 41cbcfeda67 fix: avoid return null ListenableFuture when checking if
operator is blocked (#16337)
41cbcfeda67 is described below
commit 41cbcfeda67c7f28b59174504c5b9f027ec26545
Author: shizy <[email protected]>
AuthorDate: Wed Sep 3 18:29:18 2025 +0800
fix: avoid return null ListenableFuture when checking if operator is
blocked (#16337)
---
.../queryengine/execution/operator/process/AbstractIntoOperator.java | 5 +++--
.../queryengine/execution/operator/process/ai/InferenceOperator.java | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java
index 7773dc24a78..444c5001975 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/AbstractIntoOperator.java
@@ -79,10 +79,11 @@ public abstract class AbstractIntoOperator implements
ProcessOperator {
@Override
public ListenableFuture<?> isBlocked() {
ListenableFuture<?> childBlocked = child.isBlocked();
+ boolean childDone = childBlocked.isDone();
boolean writeDone = writeOperationDone();
- if (writeDone && childBlocked.isDone()) {
+ if (writeDone && childDone) {
return NOT_BLOCKED;
- } else if (childBlocked.isDone()) {
+ } else if (childDone) {
return writeOperationFuture;
} else if (writeDone) {
return childBlocked;
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java
index fd51ced46e8..ccdef60aaf0 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/process/ai/InferenceOperator.java
@@ -130,10 +130,11 @@ public class InferenceOperator implements ProcessOperator
{
@Override
public ListenableFuture<?> isBlocked() {
ListenableFuture<?> childBlocked = child.isBlocked();
+ boolean childDone = childBlocked.isDone();
boolean executionDone = forecastExecutionDone();
- if (executionDone && childBlocked.isDone()) {
+ if (executionDone && childDone) {
return NOT_BLOCKED;
- } else if (childBlocked.isDone()) {
+ } else if (childDone) {
return inferenceExecutionFuture;
} else if (executionDone) {
return childBlocked;