Don't release locks early in metadata functions

pull/1453/head
Brian Cloutier 2017-07-06 16:58:32 +03:00 committed by Marco Slot
parent f40f03270a
commit ee4edc498f
1 changed files with 7 additions and 7 deletions

View File

@ -642,7 +642,7 @@ NodeHasShardPlacements(char *nodeName, int32 nodePort, bool onlyConsiderActivePl
hasFinalizedPlacements = HeapTupleIsValid(heapTuple); hasFinalizedPlacements = HeapTupleIsValid(heapTuple);
systable_endscan(scanDescriptor); systable_endscan(scanDescriptor);
heap_close(pgPlacement, AccessShareLock); heap_close(pgPlacement, NoLock);
return hasFinalizedPlacements; return hasFinalizedPlacements;
} }
@ -746,7 +746,7 @@ BuildShardPlacementList(ShardInterval *shardInterval)
} }
systable_endscan(scanDescriptor); systable_endscan(scanDescriptor);
heap_close(pgPlacement, AccessShareLock); heap_close(pgPlacement, NoLock);
return shardPlacementList; return shardPlacementList;
} }
@ -840,7 +840,7 @@ InsertShardRow(Oid relationId, uint64 shardId, char storageType,
CitusInvalidateRelcacheByRelid(relationId); CitusInvalidateRelcacheByRelid(relationId);
CommandCounterIncrement(); CommandCounterIncrement();
heap_close(pgDistShard, RowExclusiveLock); heap_close(pgDistShard, NoLock);
} }
@ -885,7 +885,7 @@ InsertShardPlacementRow(uint64 shardId, uint64 placementId,
CitusInvalidateRelcacheByShardId(shardId); CitusInvalidateRelcacheByShardId(shardId);
CommandCounterIncrement(); CommandCounterIncrement();
heap_close(pgDistPlacement, RowExclusiveLock); heap_close(pgDistPlacement, NoLock);
} }
@ -1026,7 +1026,7 @@ DeletePartitionRow(Oid distributedRelationId)
/* increment the counter so that next command can see the row */ /* increment the counter so that next command can see the row */
CommandCounterIncrement(); CommandCounterIncrement();
heap_close(pgDistPartition, RowExclusiveLock); heap_close(pgDistPartition, NoLock);
} }
@ -1073,7 +1073,7 @@ DeleteShardRow(uint64 shardId)
CitusInvalidateRelcacheByRelid(distributedRelationId); CitusInvalidateRelcacheByRelid(distributedRelationId);
CommandCounterIncrement(); CommandCounterIncrement();
heap_close(pgDistShard, RowExclusiveLock); heap_close(pgDistShard, NoLock);
} }
@ -1125,7 +1125,7 @@ DeleteShardPlacementRow(uint64 placementId)
CitusInvalidateRelcacheByShardId(shardId); CitusInvalidateRelcacheByShardId(shardId);
CommandCounterIncrement(); CommandCounterIncrement();
heap_close(pgDistPlacement, RowExclusiveLock); heap_close(pgDistPlacement, NoLock);
} }