summaryrefslogtreecommitdiff
path: root/src/mongo/db/concurrency/locker.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-12-17 15:46:26 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2014-12-18 15:03:48 -0500
commitcf0c561330c073bebf63f5246e815ec44f7180db (patch)
tree9ed75bf83259a4525ebc95eb203f410db051f281 /src/mongo/db/concurrency/locker.h
parent26b6aa8dab1d265ad2c20f952ec862858a1fc9fb (diff)
downloadmongo-cf0c561330c073bebf63f5246e815ec44f7180db.tar.gz
SERVER-16431 Move the acquisition of the flush lock to a separate method
Also adds assertions and new tests. No functional changes yet - this is in preparation for removal of the parallel batch writer lock.
Diffstat (limited to 'src/mongo/db/concurrency/locker.h')
-rw-r--r--src/mongo/db/concurrency/locker.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h
index ad79a9e0b6f..e95f98a6855 100644
--- a/src/mongo/db/concurrency/locker.h
+++ b/src/mongo/db/concurrency/locker.h
@@ -76,11 +76,7 @@ namespace mongo {
virtual LockResult lockGlobal(LockMode mode, unsigned timeoutMs = UINT_MAX) = 0;
/**
- * Requests *only* the global lock to be acquired in the specified mode. Does not do the
- * full MMAP V1 concurrency control functionality, which acquires the flush lock as well.
- *
- * Should only be used for cases, where no data reads or writes will be performed, such as
- * replication step-down.
+ * Requests the global lock to be acquired in the specified mode.
*
* See the comments for lockBegin/Complete for more information on the semantics.
*/
@@ -88,6 +84,12 @@ namespace mongo {
virtual LockResult lockGlobalComplete(unsigned timeoutMs) = 0;
/**
+ * This method is used only in the MMAP V1 storage engine, otherwise it is a no-op. See the
+ * comments in the implementation for more details on how MMAP V1 journaling works.
+ */
+ virtual void lockMMAPV1Flush() = 0;
+
+ /**
* Decrements the reference count on the global lock. If the reference count on the
* global lock hits zero, the transaction is over, and unlockAll unlocks all other locks.
*