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:09 UTC
[1/2] incubator-hawq git commit: HAWQ-524. Modify processing for
cdbDispatchResult->resultBuf when creation and free
Repository: incubator-hawq
Updated Branches:
refs/heads/master d5e7b9270 -> ac26f48fd
HAWQ-524. Modify processing for cdbDispatchResult->resultBuf when creation and free
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/ac26f48f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/ac26f48f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/ac26f48f
Branch: refs/heads/master
Commit: ac26f48fd44af17c26cee0ce48a44bf50ddeb9ca
Parents: 4b53168
Author: Lili Ma <lm...@pivotal.io>
Authored: Mon Mar 14 17:47:42 2016 +0800
Committer: Lili Ma <lm...@pivotal.io>
Committed: Tue Mar 15 09:38:40 2016 +0800
----------------------------------------------------------------------
src/backend/cdb/cdbdispatchresult.c | 19 +++++++++++--------
src/backend/cdb/executormgr.c | 4 +++-
2 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ac26f48f/src/backend/cdb/cdbdispatchresult.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbdispatchresult.c b/src/backend/cdb/cdbdispatchresult.c
index b036b26..9ba90c0 100644
--- a/src/backend/cdb/cdbdispatchresult.c
+++ b/src/backend/cdb/cdbdispatchresult.c
@@ -183,15 +183,18 @@ void
cdbdisp_resetResult(CdbDispatchResult *dispatchResult)
{
PQExpBuffer buf = dispatchResult->resultbuf;
- PGresult **begp = (PGresult **)buf->data;
- PGresult **endp = (PGresult **)(buf->data + buf->len);
- PGresult **p;
-
- /* Free the PGresult objects. */
- for (p = begp; p < endp; ++p)
+ if (buf != NULL)
{
- Assert(*p != NULL);
- PQclear(*p);
+ PGresult **begp = (PGresult **)buf->data;
+ PGresult **endp = (PGresult **)(buf->data + buf->len);
+ PGresult **p;
+
+ /* Free the PGresult objects. */
+ for (p = begp; p < endp; ++p)
+ {
+ Assert(*p != NULL);
+ PQclear(*p);
+ }
}
/* Reset summary indicators. */
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ac26f48f/src/backend/cdb/executormgr.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/executormgr.c b/src/backend/cdb/executormgr.c
index 88dd32f..47f5bbe 100644
--- a/src/backend/cdb/executormgr.c
+++ b/src/backend/cdb/executormgr.c
@@ -220,7 +220,9 @@ executormgr_bind_executor_task(struct DispatchData *data,
executor->refResult = cdbdisp_makeResult(dispatch_get_results(data),
executor->desc,
dispatch_get_task_identity(task)->slice_id);
- Assert(executor->refResult != NULL);
+
+ if (executor->refResult == NULL)
+ return false;
/* Transfer any connection errors from segdbDesc. */
executormgr_merge_error(executor);
[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.
Posted by li...@apache.org.
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
},
{