summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/oplog_note.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/oplog_note.cpp')
-rw-r--r--src/mongo/db/commands/oplog_note.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/commands/oplog_note.cpp b/src/mongo/db/commands/oplog_note.cpp
index 852a25b411a..8cd038204d4 100644
--- a/src/mongo/db/commands/oplog_note.cpp
+++ b/src/mongo/db/commands/oplog_note.cpp
@@ -56,7 +56,8 @@ Status _performNoopWrite(OperationContext* opCtx, BSONObj msgObj, StringData not
// 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.
- Lock::GlobalLock lock(opCtx, MODE_IX, Date_t::now() + Milliseconds(1));
+ Lock::GlobalLock lock(
+ opCtx, MODE_IX, Date_t::now() + Milliseconds(1), Lock::InterruptBehavior::kThrow);
if (!lock.isLocked()) {
LOG(1) << "Global lock is not available skipping noopWrite";