You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by hu...@apache.org on 2026/04/13 06:40:14 UTC

(doris) branch fe_local_shuffle updated: [fix](local shuffle) Fix HashJoin COREDUMP: isSerialChildInThrift skip non-ScanNode children

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 bfec51a69bb [fix](local shuffle) Fix HashJoin COREDUMP: isSerialChildInThrift skip non-ScanNode children
bfec51a69bb is described below

commit bfec51a69bb2fd76c1b7a5d6822c338c6fadaddc
Author: 924060929 <la...@selectdb.com>
AuthorDate: Mon Apr 13 14:40:00 2026 +0800

    [fix](local shuffle) Fix HashJoin COREDUMP: isSerialChildInThrift skip non-ScanNode children
    
    HashJoinBuildSinkOperatorX::sink crashed in set_ready_to_read() with
    empty source_deps. Root cause: isSerialChildInThrift() used
    useSerialSource() which returns true for non-pooling fragments with
    serial operators, causing BROADCAST joins to request PT/PASS_TO_ONE
    even when not needed. The insertLocalExchange guard skips PT for the
    probe side but PASS_TO_ONE is exempted → probe/build task mismatch.
    
    Fix: in isSerialChildInThrift(), only consider non-Exchange children
    serial when they are ScanNodes (actual pooling scan). Non-Scan children
    (AGG, NLJ, etc.) return false to avoid incorrect LE insertion.
    Exchange children retain the existing logic (isSerialOperator ||
    hasSerialScanNode) for pooling scan fragments.
---
 .../src/main/java/org/apache/doris/planner/HashJoinNode.java | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
index c353463cb99..946b5899944 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
@@ -364,8 +364,16 @@ public class HashJoinNode extends JoinNodeBase {
         if (!useSerialSource) {
             return false;
         }
-        if (child instanceof ExchangeNode) {
-            return child.isSerialOperator() || childFragment.hasSerialScanNode();
+        // Only consider the child serial for LE decisions when it's an actual pooling
+        // ScanNode. For serial non-Scan children (Exchange, AGG, NLJ), useSerialSource()
+        // may return true due to serial operators in the fragment, but inserting
+        // PASSTHROUGH/PASS_TO_ONE creates pipeline splits with mismatched task counts
+        // → HashJoinBuildSink source_deps empty → crash in set_ready_to_read().
+        if (!(child instanceof ScanNode)) {
+            if (child instanceof ExchangeNode) {
+                return child.isSerialOperator() || childFragment.hasSerialScanNode();
+            }
+            return false;
         }
         return child.isSerialOperator();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org