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/16 04:18:55 UTC

(doris) branch fe_local_shuffle updated: [fix](local shuffle) Fix ExchangeNode.isSerialOperator: restore mergeInfo != null condition

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 bc6a98fb09b [fix](local shuffle) Fix ExchangeNode.isSerialOperator: restore mergeInfo != null condition
bc6a98fb09b is described below

commit bc6a98fb09bc59af040f12cf2c3224ee09dc4dad
Author: 924060929 <la...@selectdb.com>
AuthorDate: Thu Apr 16 12:18:33 2026 +0800

    [fix](local shuffle) Fix ExchangeNode.isSerialOperator: restore mergeInfo != null condition
    
    The condition was accidentally inverted from `mergeInfo != null` (master) to
    `mergeInfo == null`, causing non-merging UNPARTITIONED Exchanges to be marked
    serial. This triggered a chain of issues:
    
    1. hasSerialChildren() returned true for fragments with non-merging Exchanges
    2. useSerialSource() returned true → coordinator assigned multiple instances
       to UNPARTITIONED fragments (scalar merge-finalize AGG)
    3. Scalar AGG marked serial in Thrift → BE reduced AGGSource pipeline to 1 task
    4. But AGGSink pipeline in LE-containing pipeline had _num_instances tasks
    5. Mismatch → instance 1+ had AGGSink tasks with no AGGSource → SIGSEGV
    
    Restoring `mergeInfo != null` matches master behavior: only sort-merge Exchanges
    are considered serial, so UNPARTITIONED fragments with scalar AGG get 1 instance
    (no mismatch).
---
 fe/fe-core/src/main/java/org/apache/doris/planner/ExchangeNode.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/ExchangeNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/ExchangeNode.java
index 8fc40c125be..8f6e8a7994a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/ExchangeNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/ExchangeNode.java
@@ -160,7 +160,7 @@ public class ExchangeNode extends PlanNode {
     @Override
     public boolean isSerialOperator() {
         return (ConnectContext.get() != null && ConnectContext.get().getSessionVariable().isUseSerialExchange()
-                || partitionType == TPartitionType.UNPARTITIONED) && mergeInfo == null;
+                || partitionType == TPartitionType.UNPARTITIONED) && mergeInfo != null;
     }
 
     @Override


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