mirror of https://github.com/citusdata/citus.git
Reuse SendCommandListToWorkerInSeparateTransaction inside SendCommandListToWorkerOutsideTransaction
parent
a5aaa08a20
commit
708a5829f5
|
@ -340,17 +340,7 @@ SendCommandListToWorkerOutsideTransaction(const char *nodeName, int32 nodePort,
|
||||||
nodeName, nodePort,
|
nodeName, nodePort,
|
||||||
nodeUser, NULL);
|
nodeUser, NULL);
|
||||||
|
|
||||||
MarkRemoteTransactionCritical(workerConnection);
|
SendCommandListToWorkerInSeparateTransaction(workerConnection, commandList);
|
||||||
RemoteTransactionBegin(workerConnection);
|
|
||||||
|
|
||||||
/* iterate over the commands and execute them in the same connection */
|
|
||||||
const char *commandString = NULL;
|
|
||||||
foreach_ptr(commandString, commandList)
|
|
||||||
{
|
|
||||||
ExecuteCriticalRemoteCommand(workerConnection, commandString);
|
|
||||||
}
|
|
||||||
|
|
||||||
RemoteTransactionCommit(workerConnection);
|
|
||||||
CloseConnection(workerConnection);
|
CloseConnection(workerConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue