mirror of https://github.com/citusdata/citus.git
remove_socket_check
parent
11ff4a1faf
commit
1e5096e29d
|
@ -3326,10 +3326,10 @@ OpenNewConnections(WorkerPool *workerPool, int newConnectionCount,
|
||||||
newConnectionsList = lappend(newConnectionsList, session);
|
newConnectionsList = lappend(newConnectionsList, session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||||
bool socketClosedOnly = true;
|
bool socketClosedOnly = true;
|
||||||
RebuildWaitEventSet(workerPool->distributedExecution, socketClosedOnly);
|
RebuildWaitEventSet(workerPool->distributedExecution, socketClosedOnly);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Before using this connection in the distributed execution, we check
|
* Before using this connection in the distributed execution, we check
|
||||||
* whether the remote connection is closed/lost. This is common
|
* whether the remote connection is closed/lost. This is common
|
||||||
|
@ -3344,7 +3344,6 @@ OpenNewConnections(WorkerPool *workerPool, int newConnectionCount,
|
||||||
workerPool->distributedExecution->eventSetSize,
|
workerPool->distributedExecution->eventSetSize,
|
||||||
WAIT_EVENT_CLIENT_READ);
|
WAIT_EVENT_CLIENT_READ);
|
||||||
|
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_15
|
|
||||||
ProcessWaitEventsForSocketClosed(workerPool->distributedExecution->events,
|
ProcessWaitEventsForSocketClosed(workerPool->distributedExecution->events,
|
||||||
eventCount);
|
eventCount);
|
||||||
#endif
|
#endif
|
||||||
|
@ -5490,8 +5489,10 @@ BuildWaitEventSet(List *sessionList, bool socketClosedOnly)
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (!socketClosedOnly)
|
if (!socketClosedOnly)
|
||||||
|
{
|
||||||
CitusAddWaitEventSetToSet(waitEventSet, WL_LATCH_SET, PGINVALID_SOCKET, MyLatch,
|
CitusAddWaitEventSetToSet(waitEventSet, WL_LATCH_SET, PGINVALID_SOCKET, MyLatch,
|
||||||
NULL);
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
return waitEventSet;
|
return waitEventSet;
|
||||||
}
|
}
|
||||||
|
@ -5503,8 +5504,8 @@ BuildWaitEventSet(List *sessionList, bool socketClosedOnly)
|
||||||
* to the waitEventSet.
|
* to the waitEventSet.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
AddSessionToWaitEventSet(WorkerSession *session, WaitEventSet *waitEventSet, bool
|
AddSessionToWaitEventSet(WorkerSession *session, WaitEventSet *waitEventSet,
|
||||||
socketClosedOnly)
|
bool socketClosedOnly)
|
||||||
{
|
{
|
||||||
MultiConnection *connection = session->connection;
|
MultiConnection *connection = session->connection;
|
||||||
|
|
||||||
|
@ -5531,9 +5532,15 @@ AddSessionToWaitEventSet(WorkerSession *session, WaitEventSet *waitEventSet, boo
|
||||||
|
|
||||||
if (socketClosedOnly)
|
if (socketClosedOnly)
|
||||||
{
|
{
|
||||||
|
#if PG_VERSION_NUM >= PG_VERSION_15
|
||||||
|
|
||||||
waitEventSetIndex = CitusAddWaitEventSetToSet(waitEventSet, WL_SOCKET_CLOSED,
|
waitEventSetIndex = CitusAddWaitEventSetToSet(waitEventSet, WL_SOCKET_CLOSED,
|
||||||
sock,
|
sock,
|
||||||
NULL, (void *) session);
|
NULL, (void *) session);
|
||||||
|
#else
|
||||||
|
/* socketClosedOnly is only true for */
|
||||||
|
Assert (false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue