diff options
author | Geert Bosch <bosch@gnat.com> | 2018-07-08 11:26:02 -0400 |
---|---|---|
committer | Geert Bosch <geert@mongodb.com> | 2018-07-11 10:11:00 -0400 |
commit | c7bd92f7ded5501654989eb9b9a80bbf50d3ec3b (patch) | |
tree | 60724a273bc50960b0ed9afee6e24ad8b92e8e1b /src/mongo/db/commands/oplog_note.cpp | |
parent | 80c7c825a44cf99b17e81f4233445c7ab1927706 (diff) | |
download | mongo-c7bd92f7ded5501654989eb9b9a80bbf50d3ec3b.tar.gz |
SERVER-36011 Remove MMAPv1 lockmanager support
Diffstat (limited to 'src/mongo/db/commands/oplog_note.cpp')
-rw-r--r-- | src/mongo/db/commands/oplog_note.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/db/commands/oplog_note.cpp b/src/mongo/db/commands/oplog_note.cpp index 09a32cc0f6e..23e9c84f0f7 100644 --- a/src/mongo/db/commands/oplog_note.cpp +++ b/src/mongo/db/commands/oplog_note.cpp @@ -53,9 +53,8 @@ namespace mongo { namespace { Status _performNoopWrite(OperationContext* opCtx, BSONObj msgObj, StringData note) { repl::ReplicationCoordinator* const replCoord = repl::ReplicationCoordinator::get(opCtx); - // Use GlobalLock + lockMMAPV1Flush instead of DBLock to allow return when the lock is not - // available. It may happen when the primary steps down and a shared global lock is - // acquired. + // Use GlobalLock instead of DBLock to allow return when the lock is not available. It may + // happen when the primary steps down and a shared global lock is acquired. Lock::GlobalLock lock( opCtx, MODE_IX, Date_t::now() + Milliseconds(1), Lock::InterruptBehavior::kThrow); @@ -63,7 +62,6 @@ Status _performNoopWrite(OperationContext* opCtx, BSONObj msgObj, StringData not LOG(1) << "Global lock is not available skipping noopWrite"; return {ErrorCodes::LockFailed, "Global lock is not available"}; } - opCtx->lockState()->lockMMAPV1Flush(); // Its a proxy for being a primary passing "local" will cause it to return true on secondary if (!replCoord->canAcceptWritesForDatabase(opCtx, "admin")) { |