summaryrefslogtreecommitdiff
path: root/src/mongo/s/catalog/dist_lock_catalog.h
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-03-07 12:00:08 -0500
committerMaria van Keulen <maria@mongodb.com>2017-03-07 12:00:08 -0500
commit589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79 (patch)
treec7a090ffdd56a91ae677e2492c61b820af44f964 /src/mongo/s/catalog/dist_lock_catalog.h
parent3cba97198638df3750e3b455e2ad57af7ee536ae (diff)
downloadmongo-589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79.tar.gz
SERVER-27938 Rename all OperationContext variables to opCtx
This commit is an automated rename of all whole word instances of txn, _txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all .cpp and .h files in src/mongo.
Diffstat (limited to 'src/mongo/s/catalog/dist_lock_catalog.h')
-rw-r--r--src/mongo/s/catalog/dist_lock_catalog.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mongo/s/catalog/dist_lock_catalog.h b/src/mongo/s/catalog/dist_lock_catalog.h
index 8bccfc6c8a7..5b2c392eb28 100644
--- a/src/mongo/s/catalog/dist_lock_catalog.h
+++ b/src/mongo/s/catalog/dist_lock_catalog.h
@@ -73,13 +73,13 @@ public:
* Returns the ping document of the specified processID.
* Common status errors include socket errors.
*/
- virtual StatusWith<LockpingsType> getPing(OperationContext* txn, StringData processID) = 0;
+ virtual StatusWith<LockpingsType> getPing(OperationContext* opCtx, StringData processID) = 0;
/**
* Updates the ping document. Creates a new entry if it does not exists.
* Common status errors include socket errors.
*/
- virtual Status ping(OperationContext* txn, StringData processID, Date_t ping) = 0;
+ virtual Status ping(OperationContext* opCtx, StringData processID, Date_t ping) = 0;
/**
* Attempts to update the owner of a lock identified by lockID to lockSessionID.
@@ -98,7 +98,7 @@ public:
* Common status errors include socket and duplicate key errors.
*/
virtual StatusWith<LocksType> grabLock(
- OperationContext* txn,
+ OperationContext* opCtx,
StringData lockID,
const OID& lockSessionID,
StringData who,
@@ -122,7 +122,7 @@ public:
*
* Common status errors include socket errors.
*/
- virtual StatusWith<LocksType> overtakeLock(OperationContext* txn,
+ virtual StatusWith<LocksType> overtakeLock(OperationContext* opCtx,
StringData lockID,
const OID& lockSessionID,
const OID& currentHolderTS,
@@ -137,46 +137,47 @@ public:
* specified session (i.e., it is not owned at all or if it is owned by a different session).
* Otherwise, it returns an error status. Common errors include socket errors.
*/
- virtual Status unlock(OperationContext* txn, const OID& lockSessionID) = 0;
+ virtual Status unlock(OperationContext* opCtx, const OID& lockSessionID) = 0;
/**
* Same as unlock() above except that it unlocks the lock document that matches "lockSessionID"
* AND "name", rather than just "lockSessionID". This is necessary if multiple documents have
* been locked with the same lockSessionID.
*/
- virtual Status unlock(OperationContext* txn, const OID& lockSessionID, StringData name) = 0;
+ virtual Status unlock(OperationContext* opCtx, const OID& lockSessionID, StringData name) = 0;
/**
* Unlocks all distributed locks with the given owning process ID. Does not provide any
* indication as to how many locks were actually unlocked. So long as the update command runs
* successfully, returns OK, otherwise returns an error status.
*/
- virtual Status unlockAll(OperationContext* txn, const std::string& processID) = 0;
+ virtual Status unlockAll(OperationContext* opCtx, const std::string& processID) = 0;
/**
* Get some information from the config server primary.
* Common status errors include socket errors.
*/
- virtual StatusWith<ServerInfo> getServerInfo(OperationContext* txn) = 0;
+ virtual StatusWith<ServerInfo> getServerInfo(OperationContext* opCtx) = 0;
/**
* Returns the lock document.
* Returns LockNotFound if lock document doesn't exist.
* Common status errors include socket errors.
*/
- virtual StatusWith<LocksType> getLockByTS(OperationContext* txn, const OID& lockSessionID) = 0;
+ virtual StatusWith<LocksType> getLockByTS(OperationContext* opCtx,
+ const OID& lockSessionID) = 0;
/**
* Returns the lock document.
* Common status errors include socket errors.
*/
- virtual StatusWith<LocksType> getLockByName(OperationContext* txn, StringData name) = 0;
+ virtual StatusWith<LocksType> getLockByName(OperationContext* opCtx, StringData name) = 0;
/**
* Attempts to delete the ping document corresponding to the given processId.
* Common status errors include socket errors.
*/
- virtual Status stopPing(OperationContext* txn, StringData processId) = 0;
+ virtual Status stopPing(OperationContext* opCtx, StringData processId) = 0;
protected:
DistLockCatalog();