You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by li...@apache.org on 2016/03/15 02:50:10 UTC
[2/2] incubator-hawq git commit: HAWQ-528. Reset
gp_connections_per_thread for dispatcher guc range from 1 to 512,
0 marks as invalid.
HAWQ-528. Reset gp_connections_per_thread for dispatcher guc range from 1 to 512, 0 marks as invalid.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/4b53168b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/4b53168b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/4b53168b
Branch: refs/heads/master
Commit: 4b53168b537832f03aa6b4160a78afb63f34fbec
Parents: d5e7b92
Author: Lili Ma <lm...@pivotal.io>
Authored: Mon Mar 14 17:39:31 2016 +0800
Committer: Lili Ma <lm...@pivotal.io>
Committed: Tue Mar 15 09:38:40 2016 +0800
----------------------------------------------------------------------
src/backend/cdb/dispatcher.c | 7 +------
src/backend/cdb/dispatcher_mgt.c | 9 +--------
src/backend/utils/misc/guc.c | 2 +-
3 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4b53168b/src/backend/cdb/dispatcher.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/dispatcher.c b/src/backend/cdb/dispatcher.c
index 57ccdf4..20e97ab 100644
--- a/src/backend/cdb/dispatcher.c
+++ b/src/backend/cdb/dispatcher.c
@@ -1656,12 +1656,7 @@ dispatcher_compute_threads_num(DispatchData *data)
/* TODO: decide the groups(threads) number. */
if (query_executors_num == 0)
threads_num = 1;
- if (executors_num_per_thread == 0)
- {
- threads_num = query_executors_num;
- executors_num_per_thread = 1;
- }
- else if (executors_num_per_thread > query_executors_num)
+ if (executors_num_per_thread > query_executors_num)
threads_num = 1;
else
threads_num = (query_executors_num / executors_num_per_thread) + ((query_executors_num % executors_num_per_thread == 0) ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4b53168b/src/backend/cdb/dispatcher_mgt.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/dispatcher_mgt.c b/src/backend/cdb/dispatcher_mgt.c
index 2920249..d0fd7e7 100644
--- a/src/backend/cdb/dispatcher_mgt.c
+++ b/src/backend/cdb/dispatcher_mgt.c
@@ -449,14 +449,7 @@ dispmgt_create_concurrent_connect_state(List *executors, int executors_num_per_t
int i, j;
/* Compute threads_num */
- if (executors_num == 0)
- return NIL;
- else if (executors_num_per_thread == 0)
- {
- threads_num = executors_num;
- executors_num_per_thread = 1;
- }
- else if (executors_num_per_thread > executors_num)
+ if (executors_num_per_thread > executors_num)
threads_num = 1;
else
threads_num = (executors_num / executors_num_per_thread) + ((executors_num % executors_num_per_thread == 0) ? 0 : 1);
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4b53168b/src/backend/utils/misc/guc.c
----------------------------------------------------------------------
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 5b04054..aac7192 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -5647,7 +5647,7 @@ static struct config_int ConfigureNamesInt[] =
GUC_NOT_IN_SAMPLE | GUC_GPDB_ADDOPT
},
&gp_connections_per_thread,
- 512, 0, INT_MAX, assign_gp_connections_per_thread, show_gp_connections_per_thread
+ 512, 1, INT_MAX, assign_gp_connections_per_thread, show_gp_connections_per_thread
},
{