diff options
author | Spencer T Brody <spencer@mongodb.com> | 2018-08-22 14:37:16 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@mongodb.com> | 2018-09-18 13:20:18 -0400 |
commit | e65ff57e108ed69c46cc0b0ccbdd675663de2469 (patch) | |
tree | 010051703fd944884d99571e31f1dd45b28da8a1 /src/mongo/db/concurrency/locker.h | |
parent | 157691ef0babb24cd1566446f5f88206f9607564 (diff) | |
download | mongo-e65ff57e108ed69c46cc0b0ccbdd675663de2469.tar.gz |
SERVER-36913 Add functionality to LockManager for repl state transitions with prepared transactions.
Diffstat (limited to 'src/mongo/db/concurrency/locker.h')
-rw-r--r-- | src/mongo/db/concurrency/locker.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h index 29b0ca9d364..07e45d052c5 100644 --- a/src/mongo/db/concurrency/locker.h +++ b/src/mongo/db/concurrency/locker.h @@ -366,6 +366,26 @@ public: virtual void restoreLockState(const LockSnapshot& stateToRestore) = 0; /** + * Works like restoreLockState but for any global locks in the state to restore, rather than + * restoring them into the true global lock resource owned by the LockManager, + * restores the global locks into the TemporaryResourceQueue for the global resource that is + * provided. Locks on resources other than the global lock are restored to their true + * LockManager-owned resource objects. + */ + virtual void restoreLockStateWithTemporaryGlobalResource( + OperationContext* opCtx, + const LockSnapshot& stateToRestore, + LockManager::TemporaryResourceQueue* tempGlobalResource) = 0; + + /** + * Atomically releases the global X lock from the true global resource managed by the + * LockManager and transfers the locks from the 'tempGlobalResource' into the true global + * resource. + */ + virtual void replaceGlobalLockStateWithTemporaryGlobalResource( + LockManager::TemporaryResourceQueue* tempGlobalResource) = 0; + + /** * Releases the ticket associated with the Locker. This allows locks to be held without * contributing to reader/writer throttling. */ |