Fix isolation tester

add_worker_query_again
Onder Kalaci 2022-02-16 17:07:33 +01:00
parent 3c5a146ae1
commit 45b1d04850
2 changed files with 11 additions and 3 deletions

View File

@ -234,8 +234,15 @@ GetConnParams(ConnectionHashKey *key, char ***keywords, char ***values,
char nodePortString[12] = ""; char nodePortString[12] = "";
StringInfo applicationName = makeStringInfo(); StringInfo applicationName = makeStringInfo();
if (AllowNonIdleTransactionOnXactHandling())
{
appendStringInfoString(applicationName, "citus isolation test");
}
else
{
appendStringInfo(applicationName, "%s%ld", CITUS_APPLICATION_NAME_PREFIX, appendStringInfo(applicationName, "%s%ld", CITUS_APPLICATION_NAME_PREFIX,
GetGlobalPID()); GetGlobalPID());
}
/* /*
* This function has three sections: * This function has three sections:

View File

@ -104,8 +104,9 @@ start_session_level_connection_to_node(PG_FUNCTION_ARGS)
*/ */
if (singleConnection == NULL) if (singleConnection == NULL)
{ {
singleConnection = GetNodeConnection(connectionFlags, nodeNameString, nodePort);
allowNonIdleRemoteTransactionOnXactHandling = true; allowNonIdleRemoteTransactionOnXactHandling = true;
singleConnection = GetNodeConnection(connectionFlags, nodeNameString, nodePort);
} }
if (PQstatus(singleConnection->pgConn) != CONNECTION_OK) if (PQstatus(singleConnection->pgConn) != CONNECTION_OK)