mirror of https://github.com/citusdata/citus.git
Simplification
parent
2edfea05ce
commit
ab78ab82a6
|
@ -1458,7 +1458,7 @@ AfterXactHostConnectionHandling(ConnectionHashEntry *entry, bool isCommit)
|
||||||
/*
|
/*
|
||||||
* reset healthy session lifespan connections.
|
* reset healthy session lifespan connections.
|
||||||
*/
|
*/
|
||||||
ResetConnection(connection);
|
CloseRemoteTransaction(connection);
|
||||||
|
|
||||||
UnclaimConnection(connection);
|
UnclaimConnection(connection);
|
||||||
|
|
||||||
|
@ -1500,22 +1500,6 @@ ShouldShutdownConnection(MultiConnection *connection, const int cachedConnection
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ResetConnection preserves the given connection for later usage by
|
|
||||||
* resetting its states.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
ResetConnection(MultiConnection *connection)
|
|
||||||
{
|
|
||||||
/* reset per-transaction state */
|
|
||||||
ResetRemoteTransaction(connection);
|
|
||||||
ResetShardPlacementAssociation(connection);
|
|
||||||
|
|
||||||
/* reset copy state */
|
|
||||||
connection->copyBytesWrittenSinceLastFlush = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* RemoteTransactionIdle function returns true if we manually
|
* RemoteTransactionIdle function returns true if we manually
|
||||||
* set flag on run_commands_on_session_level_connection_to_node to true to
|
* set flag on run_commands_on_session_level_connection_to_node to true to
|
||||||
|
|
|
@ -768,7 +768,12 @@ CloseRemoteTransaction(struct MultiConnection *connection)
|
||||||
dlist_delete(&connection->transactionNode);
|
dlist_delete(&connection->transactionNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetConnection(connection);
|
/* reset per-transaction state */
|
||||||
|
ResetRemoteTransaction(connection);
|
||||||
|
ResetShardPlacementAssociation(connection);
|
||||||
|
|
||||||
|
/* reset copy state */
|
||||||
|
connection->copyBytesWrittenSinceLastFlush = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,6 @@ extern MultiConnection * ConnectionAvailableToNode(char *hostName, int nodePort,
|
||||||
extern void CloseConnection(MultiConnection *connection);
|
extern void CloseConnection(MultiConnection *connection);
|
||||||
extern void ShutdownAllConnections(void);
|
extern void ShutdownAllConnections(void);
|
||||||
extern void ShutdownConnection(MultiConnection *connection);
|
extern void ShutdownConnection(MultiConnection *connection);
|
||||||
extern void ResetConnection(MultiConnection *connection);
|
|
||||||
|
|
||||||
/* dealing with a connection */
|
/* dealing with a connection */
|
||||||
extern void FinishConnectionListEstablishment(List *multiConnectionList);
|
extern void FinishConnectionListEstablishment(List *multiConnectionList);
|
||||||
|
|
Loading…
Reference in New Issue