mirror of https://github.com/citusdata/citus.git
Fix bug where router executor sends query to failed connections
parent
1173f3f225
commit
6843ad8e91
|
@ -733,6 +733,18 @@ ExecuteSingleModifyTask(QueryDesc *queryDesc, Task *task,
|
|||
bool failOnError = false;
|
||||
int64 currentAffectedTupleCount = 0;
|
||||
|
||||
if (connection->remoteTransaction.transactionFailed)
|
||||
{
|
||||
/*
|
||||
* If GetModifyConnections failed to send BEGIN this connection will have
|
||||
* been marked as failed, and should not have any more commands sent to
|
||||
* it! Skip it for now, at the bottom of this method we call
|
||||
* MarkFailedShardPlacements() to ensure future statements will not use this
|
||||
* placement.
|
||||
*/
|
||||
continue;
|
||||
}
|
||||
|
||||
queryOK = SendQueryInSingleRowMode(connection, queryString, paramListInfo);
|
||||
if (!queryOK)
|
||||
{
|
||||
|
|
|
@ -2073,9 +2073,6 @@ INSERT INTO failure_test VALUES (1, 1);
|
|||
WARNING: connection error: localhost:57638
|
||||
DETAIL: no connection to the server
|
||||
|
||||
WARNING: connection error: localhost:57638
|
||||
DETAIL: no connection to the server
|
||||
|
||||
SELECT shardid, shardstate, nodename, nodeport FROM pg_dist_shard_placement
|
||||
WHERE shardid IN (
|
||||
SELECT shardid FROM pg_dist_shard
|
||||
|
|
Loading…
Reference in New Issue