diff options
author | Suganthi Mani <suganthi.mani@mongodb.com> | 2019-09-05 02:03:45 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-09-05 02:03:45 +0000 |
commit | 78bd6e0f1860a7c9a7ea8aa0f5de5cfb7c40465f (patch) | |
tree | e47020f7c7b4500eb377a0057bb8b88f5e6e77bf /src/mongo/db/db.cpp | |
parent | e8e3f6ff2604e33e2d7fe1ec56d6559df066a452 (diff) | |
download | mongo-78bd6e0f1860a7c9a7ea8aa0f5de5cfb7c40465f.tar.gz |
SERVER-38163 Remove enqueue abilities from GlobalLock.
Diffstat (limited to 'src/mongo/db/db.cpp')
-rw-r--r-- | src/mongo/db/db.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp index b24bdf42600..b9025bd8cce 100644 --- a/src/mongo/db/db.cpp +++ b/src/mongo/db/db.cpp @@ -1023,18 +1023,11 @@ void shutdownTask(const ShutdownTaskArgs& shutdownArgs) { // We should always be able to acquire the global lock at shutdown. // - // TODO: This call chain uses the locker directly, because we do not want to start an - // operation context, which also instantiates a recovery unit. Also, using the - // lockGlobalBegin/lockGlobalComplete sequence, we avoid taking the flush lock. - // // For a Windows service, dbexit does not call exit(), so we must leak the lock outside // of this function to prevent any operations from running that need a lock. // LockerImpl* globalLocker = new LockerImpl(); - LockResult result = globalLocker->lockGlobalBegin(MODE_X, Date_t::max()); - if (result == LOCK_WAITING) { - globalLocker->lockGlobalComplete(Date_t::max()); - } + globalLocker->lockGlobal(MODE_X); // Global storage engine may not be started in all cases before we exit if (serviceContext->getStorageEngine()) { |