diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-02-06 12:05:21 -0500 |
---|---|---|
committer | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2018-02-09 15:54:48 -0500 |
commit | e28c2f4732e490ed8efa6148d20d889dfd603028 (patch) | |
tree | d89d407bd23960ce30a68fe17b2be0992245bd80 /src/mongo/db/commands/oplog_note.cpp | |
parent | b52615ee4e518bcb29bd0601d904fd9e059ce77e (diff) | |
download | mongo-e28c2f4732e490ed8efa6148d20d889dfd603028.tar.gz |
SERVER-32682 Use deadline-oriented mechanism for lock timeout
Diffstat (limited to 'src/mongo/db/commands/oplog_note.cpp')
-rw-r--r-- | src/mongo/db/commands/oplog_note.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/commands/oplog_note.cpp b/src/mongo/db/commands/oplog_note.cpp index 5467ecf6723..109a562b2a7 100644 --- a/src/mongo/db/commands/oplog_note.cpp +++ b/src/mongo/db/commands/oplog_note.cpp @@ -57,7 +57,7 @@ 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, Milliseconds(1)); + Lock::GlobalLock lock(opCtx, MODE_IX, Date_t::now() + Milliseconds(1)); if (!lock.isLocked()) { LOG(1) << "Global lock is not available skipping noopWrite"; |