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 2023/03/22 13:59:06 UTC

[iotdb] 01/02: add dependency to the parent pipeline

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

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

commit 630599b735dd19e0fc956c45d445c31aac632f87
Author: Alima777 <wx...@gmail.com>
AuthorDate: Wed Mar 22 21:56:15 2023 +0800

    add dependency to the parent pipeline
---
 .../org/apache/iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java
index 0e556f45bb..1083fafcfc 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java
@@ -2587,8 +2587,9 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP
           if (sumOfChildPipelines > dopForChild) {
             // Update dependencyPipeId, after which finishes we can submit curChildPipeline
             while (sumOfChildPipelines > dopForChild) {
-              dependencyPipeId = context.getPipelineNumber() - sumOfChildPipelines;
               sumOfChildPipelines -= childPipelineNums.get(dependencyChildNode);
+              // The dependency pipeline must be a parent pipeline rather than a child pipeline
+              dependencyPipeId = context.getPipelineNumber() - sumOfChildPipelines - 1;
               sumOfChildExchangeNums -= childExchangeNums.get(dependencyChildNode);
               dependencyChildNode++;
             }