This is an automated email from the ASF dual-hosted git repository.
maxyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push:
new f668d857bc Revert "Prepare GUC option string only once during gang
creation"
f668d857bc is described below
commit f668d857bc7f895f437c1f4b6cd392c41d61ce38
Author: leo <[email protected]>
AuthorDate: Fri Mar 28 09:57:32 2025 +0800
Revert "Prepare GUC option string only once during gang creation"
This reverts commit 76b2ad511484745af282e1903df52e87abdf3576.
In most cases, the connections are reused in cdbgang_createGang_async.
We should make the GUC options when building connections actually.
---
src/backend/cdb/dispatcher/cdbgang_async.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/backend/cdb/dispatcher/cdbgang_async.c
b/src/backend/cdb/dispatcher/cdbgang_async.c
index 4bae04eda0..0b26f67b73 100644
--- a/src/backend/cdb/dispatcher/cdbgang_async.c
+++ b/src/backend/cdb/dispatcher/cdbgang_async.c
@@ -51,8 +51,6 @@ cdbgang_createGang_async(List *segments, SegmentType
segmentType)
PostgresPollingStatusType *pollingStatus = NULL;
SegmentDatabaseDescriptor *segdbDesc = NULL;
struct timeval startTS;
- char *options = NULL;
- char *diff_options = NULL;
Gang *newGangDefinition;
int create_gang_retry_counter = 0;
int in_recovery_mode_count = 0;
@@ -76,8 +74,6 @@ cdbgang_createGang_async(List *segments, SegmentType
segmentType)
Assert(CurrentGangCreating == NULL);
- makeOptions(&options, &diff_options);
-
/* If we're in a retry, we may need to reset our initial state, a bit */
newGangDefinition = NULL;
/* allocate and initialize a gang structure */
@@ -139,6 +135,8 @@ create_gang_retry:
{
bool ret;
char gpqeid[100];
+ char *options = NULL;
+ char *diff_options = NULL;
/*
* Create the connection requests. If we find a
segment without a
@@ -173,6 +171,8 @@ create_gang_retry:
(errcode(ERRCODE_GP_INTERCONNECTION_ERROR),
errmsg("failed to construct
connectionstring")));
+ makeOptions(&options, &diff_options);
+
/* start connection in asynchronous way */
cdbconn_doConnectStart(segdbDesc, gpqeid, options,
diff_options);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]