diff options
author | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2019-02-12 15:53:24 -0500 |
---|---|---|
committer | Xiangyu Yao <xiangyu.yao@mongodb.com> | 2019-02-20 13:14:13 -0500 |
commit | acddc7f35f0373ccb2e8fe9d45f42304b2b74f95 (patch) | |
tree | 8064f3c96f8f265d088b101c1c3bb4dd247e9bce /src/mongo/db/db.cpp | |
parent | 70aa69bfad6a66c7a00701403f1979ce77d654af (diff) | |
download | mongo-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.cpp | 4 |
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); |