mirror of https://github.com/citusdata/citus.git
Remove unused code
Probably left over from removing old repartitioning codepull/6065/head
parent
ae58ca5783
commit
3eaef027e2
|
@ -664,37 +664,6 @@ LockTransactionRecovery(LOCKMODE lockmode)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* LockJobResource acquires a lock for creating resources associated with the
|
||||
* given jobId. This resource is typically a job schema (namespace), and less
|
||||
* commonly a partition task directory.
|
||||
*/
|
||||
void
|
||||
LockJobResource(uint64 jobId, LOCKMODE lockmode)
|
||||
{
|
||||
LOCKTAG tag;
|
||||
const bool sessionLock = false;
|
||||
const bool dontWait = false;
|
||||
|
||||
SET_LOCKTAG_JOB_RESOURCE(tag, MyDatabaseId, jobId);
|
||||
|
||||
(void) LockAcquire(&tag, lockmode, sessionLock, dontWait);
|
||||
}
|
||||
|
||||
|
||||
/* Releases the lock for resources associated with the given job id. */
|
||||
void
|
||||
UnlockJobResource(uint64 jobId, LOCKMODE lockmode)
|
||||
{
|
||||
LOCKTAG tag;
|
||||
const bool sessionLock = false;
|
||||
|
||||
SET_LOCKTAG_JOB_RESOURCE(tag, MyDatabaseId, jobId);
|
||||
|
||||
LockRelease(&tag, lockmode, sessionLock);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* LockShardListMetadata takes shared locks on the metadata of all shards in
|
||||
* shardIntervalList to prevents concurrent placement changes.
|
||||
|
|
|
@ -74,14 +74,6 @@ typedef enum CitusOperations
|
|||
(uint32) (shardid), \
|
||||
ADV_LOCKTAG_CLASS_CITUS_SHARD)
|
||||
|
||||
/* reuse advisory lock, but with different, unused field 4 (6) */
|
||||
#define SET_LOCKTAG_JOB_RESOURCE(tag, db, jobid) \
|
||||
SET_LOCKTAG_ADVISORY(tag, \
|
||||
db, \
|
||||
(uint32) ((jobid) >> 32), \
|
||||
(uint32) (jobid), \
|
||||
ADV_LOCKTAG_CLASS_CITUS_JOB)
|
||||
|
||||
/* reuse advisory lock, but with different, unused field 4 (7)
|
||||
* Also it has the database hardcoded to MyDatabaseId, to ensure the locks
|
||||
* are local to each database */
|
||||
|
@ -157,10 +149,6 @@ extern void LockReferencedReferenceShardDistributionMetadata(uint64 shardId,
|
|||
/* Lock shard data, for DML commands or remote fetches */
|
||||
extern void LockShardResource(uint64 shardId, LOCKMODE lockmode);
|
||||
|
||||
/* Lock a job schema or partition task directory */
|
||||
extern void LockJobResource(uint64 jobId, LOCKMODE lockmode);
|
||||
extern void UnlockJobResource(uint64 jobId, LOCKMODE lockmode);
|
||||
|
||||
/* Lock a co-location group */
|
||||
extern void LockColocationId(int colocationId, LOCKMODE lockMode);
|
||||
extern void UnlockColocationId(int colocationId, LOCKMODE lockMode);
|
||||
|
|
Loading…
Reference in New Issue