diff options
Diffstat (limited to 'src/mongo/db/repl/noop_writer.cpp')
-rw-r--r-- | src/mongo/db/repl/noop_writer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/repl/noop_writer.cpp b/src/mongo/db/repl/noop_writer.cpp index 27a24c011ec..2016050eb0d 100644 --- a/src/mongo/db/repl/noop_writer.cpp +++ b/src/mongo/db/repl/noop_writer.cpp @@ -141,15 +141,14 @@ void NoopWriter::stopWritingPeriodicNoops() { } void NoopWriter::_writeNoop(OperationContext* 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::kLeaveUnlocked); if (!lock.isLocked()) { LOG(1) << "Global lock is not available skipping noopWrite"; return; } - opCtx->lockState()->lockMMAPV1Flush(); auto replCoord = ReplicationCoordinator::get(opCtx); // Its a proxy for being a primary |