diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2020-11-12 18:23:34 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-13 01:13:53 +0000 |
commit | 185000ad894d5cb95a3c946158712054db57cb7a (patch) | |
tree | 274e6317aaea9af33aa6160e11e1e57325c4a195 /src/mongo/db/service_context.cpp | |
parent | 911538668252d9885fe3d3859175f2711fb064bc (diff) | |
download | mongo-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.cpp | 8 |
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); |