Merge pull request #3666 from citusdata/size-functions-without-locks

Remove metadata locks from size functions
pull/3719/head
Hanefi Onaldi 2020-04-07 18:02:39 +03:00 committed by GitHub
commit e31dcff178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 12 deletions

View File

@ -301,18 +301,6 @@ ShardIntervalsOnWorkerGroup(WorkerNode *workerNode, Oid relationId)
placementIndex++) placementIndex++)
{ {
GroupShardPlacement *placement = &placementArray[placementIndex]; GroupShardPlacement *placement = &placementArray[placementIndex];
uint64 shardId = placement->shardId;
bool metadataLock = TryLockShardDistributionMetadata(shardId, ShareLock);
/* if the lock is not acquired warn the user */
if (metadataLock == false)
{
ereport(WARNING, (errcode(ERRCODE_LOCK_NOT_AVAILABLE),
errmsg("lock is not acquired, size of shard "
UINT64_FORMAT " will be ignored", shardId)));
continue;
}
if (placement->groupId == workerNode->groupId) if (placement->groupId == workerNode->groupId)
{ {