mirror of https://github.com/citusdata/citus.git
Get shard resource locks for only DMLs
parent
a9cf0c3e66
commit
32b7e152a3
|
@ -1063,8 +1063,15 @@ ExecuteModifyTasks(List *taskList, bool expectResults, ParamListInfo paramListIn
|
|||
LockPartitionRelations(firstShardInterval->relationId, RowExclusiveLock);
|
||||
}
|
||||
|
||||
/* ensure that there are no concurrent modifications on the same shards */
|
||||
AcquireExecutorMultiShardLocks(taskList);
|
||||
/*
|
||||
* Ensure that there are no concurrent modifications on the same
|
||||
* shards. For DDL commands, we already obtained the appropriate
|
||||
* locks in ProcessUtility.
|
||||
*/
|
||||
if (firstTask->taskType == MODIFY_TASK)
|
||||
{
|
||||
AcquireExecutorMultiShardLocks(taskList);
|
||||
}
|
||||
|
||||
BeginOrContinueCoordinatedTransaction();
|
||||
|
||||
|
|
Loading…
Reference in New Issue