Merge pull request #1895 from citusdata/no_shard_locks_for_ddls

Get shard resource locks for only DMLs
pull/1899/merge
Metin Döşlü 2017-12-22 10:57:20 +03:00 committed by GitHub
commit 3aee73674b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -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();