You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by yj...@apache.org on 2024/12/25 23:39:09 UTC
(cloudberry) 20/24: Eliminate alien nodes before execution for entry db
This is an automated email from the ASF dual-hosted git repository.
yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit f882215c97180a66eb19a0745b586ee15db20d20
Author: Sergey Smirnov <ss...@arenadata.io>
AuthorDate: Tue Jul 26 10:45:50 2022 +0300
Eliminate alien nodes before execution for entry db
---
src/backend/cdb/dispatcher/cdbdisp_query.c | 10 ++++++++++
src/backend/executor/execMain.c | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/backend/cdb/dispatcher/cdbdisp_query.c b/src/backend/cdb/dispatcher/cdbdisp_query.c
index e9eb99d0fb..c241404eb4 100644
--- a/src/backend/cdb/dispatcher/cdbdisp_query.c
+++ b/src/backend/cdb/dispatcher/cdbdisp_query.c
@@ -1414,6 +1414,16 @@ formIdleSegmentIdList(void)
}
}
+ if (cdbs->entry_db_info != NULL)
+ {
+ for (i = 0; i < cdbs->total_entry_dbs; i++)
+ {
+ CdbComponentDatabaseInfo *cdi = &cdbs->entry_db_info[i];
+ for (j = 0; j < cdi->numIdleQEs; j++)
+ segments = lappend_int(segments, cdi->config->segindex);
+ }
+ }
+
return segments;
}
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 40bb773761..370c4ce7a5 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -551,7 +551,7 @@ standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
*
* TODO: eliminate aliens even on master, if not EXPLAIN ANALYZE
*/
- estate->eliminateAliens = execute_pruned_plan && estate->es_sliceTable && estate->es_sliceTable->hasMotions && !IS_QUERY_DISPATCHER();
+ estate->eliminateAliens = execute_pruned_plan && estate->es_sliceTable && estate->es_sliceTable->hasMotions && (Gp_role == GP_ROLE_EXECUTE);
/*
* Set up an AFTER-trigger statement context, unless told not to, or
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org