yjhjstz commented on code in PR #1571:
URL: https://github.com/apache/cloudberry/pull/1571#discussion_r2789862682


##########
src/backend/executor/execMain.c:
##########
@@ -2741,6 +2741,18 @@ ExecutePlan(EState *estate,
        if (!execute_once || GP_ROLE_DISPATCH == Gp_role)
                use_parallel_mode = false;
 
+       /*
+        * If the plan contains Gather/GatherMerge nodes (parallelModeNeeded),
+        * enable PG-style parallel mode on segments even if CBDB MPP parallel
+        * mode (useMppParallelMode) didn't set it. This ensures ExecGather
+        * can launch parallel workers.
+        */
+       if (!use_parallel_mode &&
+               execute_once &&
+               Gp_role != GP_ROLE_DISPATCH &&
+               estate->es_plannedstmt->parallelModeNeeded)
+               use_parallel_mode = true;

Review Comment:
   why change this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to