mirror of https://github.com/citusdata/citus.git
Remove unused lock functions (#6747)
Code cleanup. This change removes two unused functions seemingly left over after a previous refactoring of shard move code.pull/6751/head
parent
b489d763e1
commit
ed7cc8f460
|
@ -503,45 +503,6 @@ SetLocktagForShardDistributionMetadata(int64 shardId, LOCKTAG *tag)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* LockPlacementCleanup takes an exclusive lock to ensure that only one process
|
||||
* can cleanup placements at the same time.
|
||||
*/
|
||||
void
|
||||
LockPlacementCleanup(void)
|
||||
{
|
||||
LOCKTAG tag;
|
||||
const bool sessionLock = false;
|
||||
const bool dontWait = false;
|
||||
|
||||
/* Moves acquire lock with a constant operation id CITUS_SHARD_MOVE.
|
||||
* This will change as we add support for parallel moves.
|
||||
*/
|
||||
SET_LOCKTAG_CITUS_OPERATION(tag, CITUS_SHARD_MOVE);
|
||||
(void) LockAcquire(&tag, ExclusiveLock, sessionLock, dontWait);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* TryLockPlacementCleanup takes an exclusive lock to ensure that only one
|
||||
* process can cleanup placements at the same time.
|
||||
*/
|
||||
bool
|
||||
TryLockPlacementCleanup(void)
|
||||
{
|
||||
LOCKTAG tag;
|
||||
const bool sessionLock = false;
|
||||
const bool dontWait = true;
|
||||
|
||||
/* Moves acquire lock with a constant operation id CITUS_SHARD_MOVE.
|
||||
* This will change as we add support for parallel moves.
|
||||
*/
|
||||
SET_LOCKTAG_CITUS_OPERATION(tag, CITUS_SHARD_MOVE);
|
||||
bool lockAcquired = LockAcquire(&tag, ExclusiveLock, sessionLock, dontWait);
|
||||
return lockAcquired;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* LockReferencedReferenceShardDistributionMetadata acquires shard distribution
|
||||
* metadata locks with the given lock mode on the reference tables which has a
|
||||
|
|
|
@ -53,8 +53,7 @@ typedef enum CitusOperations
|
|||
CITUS_NONBLOCKING_SPLIT = 1,
|
||||
CITUS_CREATE_DISTRIBUTED_TABLE_CONCURRENTLY = 2,
|
||||
CITUS_CREATE_COLOCATION_DEFAULT = 3,
|
||||
CITUS_SHARD_MOVE = 4,
|
||||
CITUS_BACKGROUND_TASK_MONITOR = 5
|
||||
CITUS_BACKGROUND_TASK_MONITOR = 4
|
||||
} CitusOperations;
|
||||
|
||||
/* reuse advisory lock, but with different, unused field 4 (4)*/
|
||||
|
@ -165,8 +164,6 @@ enum DistLockConfigs
|
|||
|
||||
/* Lock shard/relation metadata for safe modifications */
|
||||
extern void LockShardDistributionMetadata(int64 shardId, LOCKMODE lockMode);
|
||||
extern void LockPlacementCleanup(void);
|
||||
extern bool TryLockPlacementCleanup(void);
|
||||
extern void EnsureShardOwner(uint64 shardId, bool missingOk);
|
||||
extern void LockShardListMetadataOnWorkers(LOCKMODE lockmode, List *shardIntervalList);
|
||||
extern void BlockWritesToShardList(List *shardList);
|
||||
|
|
Loading…
Reference in New Issue