mirror of https://github.com/citusdata/citus.git
Readability improvement - 3
parent
fb4c760ce0
commit
60bf5ce127
|
|
@ -1620,6 +1620,16 @@ AcquireExecutorShardLocksForExecution(DistributedExecution *execution)
|
||||||
*/
|
*/
|
||||||
lockMode =
|
lockMode =
|
||||||
EnableDeadlockPrevention ? ShareUpdateExclusiveLock : RowExclusiveLock;
|
EnableDeadlockPrevention ? ShareUpdateExclusiveLock : RowExclusiveLock;
|
||||||
|
|
||||||
|
if (!IsCoordinator())
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* We also skip taking a heavy-weight lock when running a multi-shard
|
||||||
|
* commands from workers, since we currently do not prevent concurrency
|
||||||
|
* across workers anyway.
|
||||||
|
*/
|
||||||
|
lockMode = RowExclusiveLock;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (anyAnchorTableIsReplicated)
|
else if (anyAnchorTableIsReplicated)
|
||||||
{
|
{
|
||||||
|
|
@ -1648,15 +1658,6 @@ AcquireExecutorShardLocksForExecution(DistributedExecution *execution)
|
||||||
*/
|
*/
|
||||||
lockMode = RowExclusiveLock;
|
lockMode = RowExclusiveLock;
|
||||||
}
|
}
|
||||||
else if (!IsCoordinator())
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* We also skip taking a heavy-weight lock when running a multi-shard
|
|
||||||
* commands from workers, since we currently do not prevent concurrency
|
|
||||||
* across workers anyway.
|
|
||||||
*/
|
|
||||||
lockMode = RowExclusiveLock;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* now, iterate on the tasks and acquire the executor locks on the shards */
|
/* now, iterate on the tasks and acquire the executor locks on the shards */
|
||||||
Task *task = NULL;
|
Task *task = NULL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue