mirror of https://github.com/citusdata/citus.git
Don't mark placements inactive in COPY after successful connection
parent
d0c76407b8
commit
b1626887d5
|
@ -888,14 +888,11 @@ OpenCopyConnections(CopyStmt *copyStatement, ShardConnections *shardConnections,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If errors are supposed to cause immediate aborts (i.e. we don't
|
* Errors are supposed to cause immediate aborts (i.e. we don't
|
||||||
* want to/can't invalidate placements), mark the connection as
|
* want to/can't invalidate placements), mark the connection as
|
||||||
* critical so later errors cause failures.
|
* critical so later errors cause failures.
|
||||||
*/
|
*/
|
||||||
if (stopOnFailure)
|
|
||||||
{
|
|
||||||
MarkRemoteTransactionCritical(connection);
|
MarkRemoteTransactionCritical(connection);
|
||||||
}
|
|
||||||
ClaimConnectionExclusively(connection);
|
ClaimConnectionExclusively(connection);
|
||||||
RemoteTransactionBeginIfNecessary(connection);
|
RemoteTransactionBeginIfNecessary(connection);
|
||||||
copyCommand = ConstructCopyStatement(copyStatement, shardConnections->shardId,
|
copyCommand = ConstructCopyStatement(copyStatement, shardConnections->shardId,
|
||||||
|
@ -904,13 +901,7 @@ OpenCopyConnections(CopyStmt *copyStatement, ShardConnections *shardConnections,
|
||||||
|
|
||||||
if (PQresultStatus(result) != PGRES_COPY_IN)
|
if (PQresultStatus(result) != PGRES_COPY_IN)
|
||||||
{
|
{
|
||||||
ReportConnectionError(connection, WARNING);
|
ReportResultError(connection, result, ERROR);
|
||||||
MarkRemoteTransactionFailed(connection, true);
|
|
||||||
|
|
||||||
PQclear(result);
|
|
||||||
|
|
||||||
failedPlacementCount++;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PQclear(result);
|
PQclear(result);
|
||||||
|
|
|
@ -337,9 +337,9 @@ DELETE FROM researchers WHERE lab_id = 6;
|
||||||
\copy researchers FROM STDIN delimiter ','
|
\copy researchers FROM STDIN delimiter ','
|
||||||
COMMIT;
|
COMMIT;
|
||||||
WARNING: illegal value
|
WARNING: illegal value
|
||||||
WARNING: failed to commit transaction on localhost:57638
|
WARNING: failed to commit critical transaction on localhost:57638, metadata is likely out of sync
|
||||||
WARNING: illegal value
|
WARNING: illegal value
|
||||||
WARNING: failed to commit transaction on localhost:57637
|
WARNING: failed to commit critical transaction on localhost:57637, metadata is likely out of sync
|
||||||
WARNING: could not commit transaction for shard 1200001 on any active node
|
WARNING: could not commit transaction for shard 1200001 on any active node
|
||||||
ERROR: could not commit transaction on any active node
|
ERROR: could not commit transaction on any active node
|
||||||
\unset VERBOSITY
|
\unset VERBOSITY
|
||||||
|
|
Loading…
Reference in New Issue