This is an automated email from the ASF dual-hosted git repository. xiangweiwei pushed a commit to branch sinkBug in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit d4b072e09992ec4f2d4b00df136ea84b7c7ae9e4 Author: Alima777 <[email protected]> AuthorDate: Tue Feb 28 21:14:15 2023 +0800 Fix identitySink and shuffleSink problem --- .../iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) 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 eb53954cfa..d5a3abdb98 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 @@ -1887,10 +1887,7 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP IdentitySinkOperator.class.getSimpleName()); context.getTimeSliceAllocator().recordExecutionWeight(operatorContext, 1); - List<Operator> children = - node.getChildren().stream() - .map(child -> child.accept(this, context)) - .collect(Collectors.toList()); + List<Operator> children = dealWithConsumeChildrenOneByOneNode(node, context); checkArgument( MPP_DATA_EXCHANGE_MANAGER != null, "MPP_DATA_EXCHANGE_MANAGER should not be null"); @@ -1922,10 +1919,7 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP ShuffleHelperOperator.class.getSimpleName()); context.getTimeSliceAllocator().recordExecutionWeight(operatorContext, 1); - List<Operator> children = - node.getChildren().stream() - .map(child -> child.accept(this, context)) - .collect(Collectors.toList()); + List<Operator> children = dealWithConsumeAllChildrenPipelineBreaker(node, context); checkArgument( MPP_DATA_EXCHANGE_MANAGER != null, "MPP_DATA_EXCHANGE_MANAGER should not be null"); @@ -2552,7 +2546,10 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP subContext.setISink(localSinkChannel); subContext.addPipelineDriverFactory(childOperation, subContext.getDriverContext()); - int curChildPipelineNum = subContext.getPipelineNumber() - originPipeNum; + // OneByOneChild may be divided into more than dop pipelines, but the number of running + // is dop actually + int curChildPipelineNum = + Math.min(dopForChild, subContext.getPipelineNumber() - originPipeNum); childPipelineNums.add(curChildPipelineNum); sumOfChildPipelines += curChildPipelineNum; // If sumOfChildPipelines > dopForChild, we have to wait until some pipelines finish
