mirror of https://github.com/citusdata/citus.git
Readability improvement
parent
7cdee3347d
commit
23f800ca3a
|
@ -1603,7 +1603,7 @@ AcquireExecutorShardLocksForExecution(DistributedExecution *execution)
|
||||||
*/
|
*/
|
||||||
int lockMode = ExclusiveLock;
|
int lockMode = ExclusiveLock;
|
||||||
|
|
||||||
if (!anyAnchorTableIsReplicated && IsCoordinator())
|
if (!anyAnchorTableIsReplicated && !parallelExecutionNotPossible && IsCoordinator())
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* When all writes are commutative then we only need to prevent multi-shard
|
* When all writes are commutative then we only need to prevent multi-shard
|
||||||
|
@ -1628,8 +1628,7 @@ AcquireExecutorShardLocksForExecution(DistributedExecution *execution)
|
||||||
EnableDeadlockPrevention ? ShareUpdateExclusiveLock : RowExclusiveLock;
|
EnableDeadlockPrevention ? ShareUpdateExclusiveLock : RowExclusiveLock;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AllModificationsCommutative ||
|
if (AllModificationsCommutative)
|
||||||
(parallelExecutionNotPossible && modLevel < ROW_MODIFY_NONCOMMUTATIVE))
|
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If either the user allows via a GUC or the commands are
|
* If either the user allows via a GUC or the commands are
|
||||||
|
@ -1639,6 +1638,10 @@ AcquireExecutorShardLocksForExecution(DistributedExecution *execution)
|
||||||
*/
|
*/
|
||||||
lockMode = RowExclusiveLock;
|
lockMode = RowExclusiveLock;
|
||||||
}
|
}
|
||||||
|
else if (parallelExecutionNotPossible && modLevel < ROW_MODIFY_NONCOMMUTATIVE)
|
||||||
|
{
|
||||||
|
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