diff options
author | George Wangensteen <george.wangensteen@mongodb.com> | 2023-02-08 15:40:22 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-02-08 22:51:27 +0000 |
commit | 09df7a4b893a2b3d3bcefbf8c49767bac244f99c (patch) | |
tree | 7687a47ad21978536f726149a1cc6e312056d14d /src/mongo/db/mongod_main.cpp | |
parent | cfc94b35c35df9e1c381bf265e782d1a8cf4c332 (diff) | |
download | mongo-09df7a4b893a2b3d3bcefbf8c49767bac244f99c.tar.gz |
SERVER-59419 Move runWithoutInterruptionExceptAtGlobalShutdown to OperationContext, and then synchronize access to OperationContext::_ingoreInterrupts via the Client lock
Diffstat (limited to 'src/mongo/db/mongod_main.cpp')
-rw-r--r-- | src/mongo/db/mongod_main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/mongod_main.cpp b/src/mongo/db/mongod_main.cpp index f4eec993402..ce60ffc75b7 100644 --- a/src/mongo/db/mongod_main.cpp +++ b/src/mongo/db/mongod_main.cpp @@ -1402,7 +1402,10 @@ void shutdownTask(const ShutdownTaskArgs& shutdownArgs) { uniqueOpCtx = client->makeOperationContext(); opCtx = uniqueOpCtx.get(); } - opCtx->setIsExecutingShutdown(); + { + stdx::lock_guard lg(*client); + opCtx->setIsExecutingShutdown(); + } // This can wait a long time while we drain the secondary's apply queue, especially if // it is building an index. |