summaryrefslogtreecommitdiff
path: root/src/mongo/db/db.cpp
diff options
context:
space:
mode:
authorXiangyu Yao <xiangyu.yao@mongodb.com>2019-02-12 15:53:24 -0500
committerXiangyu Yao <xiangyu.yao@mongodb.com>2019-02-20 13:14:13 -0500
commitacddc7f35f0373ccb2e8fe9d45f42304b2b74f95 (patch)
tree8064f3c96f8f265d088b101c1c3bb4dd247e9bce /src/mongo/db/db.cpp
parent70aa69bfad6a66c7a00701403f1979ce77d654af (diff)
downloadmongo-acddc7f35f0373ccb2e8fe9d45f42304b2b74f95.tar.gz
SERVER-39425 Improve lock acquisition contract
Lock acquisition timeout should always throw exceptions rather than fail silently
Diffstat (limited to 'src/mongo/db/db.cpp')
-rw-r--r--src/mongo/db/db.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp
index 75d895a9ae6..7e340097b23 100644
--- a/src/mongo/db/db.cpp
+++ b/src/mongo/db/db.cpp
@@ -981,11 +981,9 @@ void shutdownTask() {
LockerImpl* globalLocker = new LockerImpl();
LockResult result = globalLocker->lockGlobalBegin(MODE_X, Date_t::max());
if (result == LOCK_WAITING) {
- result = globalLocker->lockGlobalComplete(Date_t::max());
+ globalLocker->lockGlobalComplete(Date_t::max());
}
- invariant(LOCK_OK == result);
-
// Global storage engine may not be started in all cases before we exit
if (serviceContext->getStorageEngine()) {
shutdownGlobalStorageEngineCleanly(serviceContext);