summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context.cpp
diff options
context:
space:
mode:
authorGregory Wlodarek <gregory.wlodarek@mongodb.com>2020-11-12 18:23:34 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-13 01:13:53 +0000
commit185000ad894d5cb95a3c946158712054db57cb7a (patch)
tree274e6317aaea9af33aa6160e11e1e57325c4a195 /src/mongo/db/service_context.cpp
parent911538668252d9885fe3d3859175f2711fb064bc (diff)
downloadmongo-185000ad894d5cb95a3c946158712054db57cb7a.tar.gz
SERVER-48221 Shut down ftdc after storage engine
Diffstat (limited to 'src/mongo/db/service_context.cpp')
-rw-r--r--src/mongo/db/service_context.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp
index 4e01b46c3b4..c8a6a6f60bd 100644
--- a/src/mongo/db/service_context.cpp
+++ b/src/mongo/db/service_context.cpp
@@ -313,7 +313,7 @@ Client* ServiceContext::LockedClientsCursor::next() {
return result;
}
-void ServiceContext::setKillAllOperations() {
+void ServiceContext::setKillAllOperations(const std::set<std::string>& excludedClients) {
stdx::lock_guard<Latch> clientLock(_mutex);
// Ensure that all newly created operation contexts will immediately be in the interrupted state
@@ -323,6 +323,12 @@ void ServiceContext::setKillAllOperations() {
// Interrupt all active operations
for (auto&& client : _clients) {
stdx::lock_guard<Client> lk(*client);
+
+ // Do not kill operations from the excluded clients.
+ if (excludedClients.find(client->desc()) != excludedClients.end()) {
+ continue;
+ }
+
auto opCtxToKill = client->getOperationContext();
if (opCtxToKill) {
killOperation(lk, opCtxToKill, ErrorCodes::InterruptedAtShutdown);