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

huajianlan pushed a commit to branch fe_local_shuffle
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/fe_local_shuffle by this push:
     new 14fd4d6217a [fix](local shuffle) revert PASSTHROUGH insertion after 
serial Exchange
14fd4d6217a is described below

commit 14fd4d6217a1e00624383b80daf5d41c4ae3b606
Author: 924060929 <[email protected]>
AuthorDate: Mon Mar 30 12:52:09 2026 +0800

    [fix](local shuffle) revert PASSTHROUGH insertion after serial Exchange
    
    Revert the deriveAndEnforceChildLocalExchange change that inserted
    PASSTHROUGH after serial Exchange operators.  This triggered a
    pre-existing BE bug in _plan_local_exchange / local exchanger handling
    of GROUPING SETS + window functions, causing SIGSEGV in
    add_mem_usage (null mem_counters) on both BE-native and FE-planned
    local exchange paths.
    
    The pre-existing BE bug exists independently of FE local shuffle
    planning — it occurs with enable_local_shuffle=true on both
    planner=true and planner=false paths.  Fixing it requires BE-side
    changes to local exchanger initialization, which is out of scope
    for the current FE local shuffle planner work.
    
    Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
---
 .../java/org/apache/doris/planner/PlanNode.java    | 23 +---------------------
 1 file changed, 1 insertion(+), 22 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java 
b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
index be96e7b9e4d..e5114f9cbd0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
@@ -1014,28 +1014,7 @@ public abstract class PlanNode extends 
TreeNode<PlanNode> {
                 ? false
                 : hasSerialAncestorInPipeline || isSerialOperator();
         translatorContext.setHasSerialAncestorInPipeline(child, 
childHasSerialAncestorInPipeline);
-        Pair<PlanNode, LocalExchangeType> result =
-                child.enforceAndDeriveLocalExchange(translatorContext, this, 
requireChild);
-
-        // If the returned node is a serial EXCHANGE operator, insert a
-        // PASSTHROUGH local exchange to create a pipeline boundary.  This
-        // mirrors BE's _add_local_exchange which inserts an exchange after
-        // serial operators, ensuring downstream pipelines have _num_instances
-        // tasks for shared state injection and proper mem_counters
-        // initialization.  Without this, the serial Exchange reduces the
-        // pipeline's num_tasks to 1, causing SIGSEGV (null mem_counters) or
-        // "must set shared state" errors.
-        //
-        // Only apply when fragment uses serial source (pooling scan mode).
-        // Without useSerialSource(), non-pooling fragments may get unnecessary
-        // PASSTHROUGH exchanges that change pipeline structure and cause 
deadlocks.
-        if (result.first instanceof ExchangeNode
-                && result.first.isSerialOperator()
-                && 
fragment.useSerialSource(translatorContext.getConnectContext())) {
-            return Pair.of(
-                    new LocalExchangeNode(translatorContext.nextPlanNodeId(), 
result.first,
-                            LocalExchangeType.PASSTHROUGH, null),
-                    result.second);
+        return child.enforceAndDeriveLocalExchange(translatorContext, this, 
requireChild);
         }
         return result;
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to