diff options
author | Suganthi Mani <suganthi.mani@mongodb.com> | 2019-01-15 06:41:23 -0500 |
---|---|---|
committer | Suganthi Mani <suganthi.mani@mongodb.com> | 2019-01-23 09:05:58 -0500 |
commit | 55d6072f0be597e950809d9ebcf9ba16cc96942d (patch) | |
tree | 46beb62563e7a2c4ef9b704123c4a540b820b5e3 /src/mongo/db/service_context.cpp | |
parent | b89d1cb056f82af22a5bef211bd2680f3784e7c2 (diff) | |
download | mongo-55d6072f0be597e950809d9ebcf9ba16cc96942d.tar.gz |
SERVER-38511 Avoid killing read operations on stepdown, gated by new server parameter “closeConnectionsOnStepdown”.
Diffstat (limited to 'src/mongo/db/service_context.cpp')
-rw-r--r-- | src/mongo/db/service_context.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp index f0b2dbbf44a..47415f498d7 100644 --- a/src/mongo/db/service_context.cpp +++ b/src/mongo/db/service_context.cpp @@ -313,24 +313,6 @@ void ServiceContext::killOperation(OperationContext* opCtx, ErrorCodes::Error ki } } -void ServiceContext::killAllUserOperations(const OperationContext* opCtx, - ErrorCodes::Error killCode) { - for (LockedClientsCursor cursor(this); Client* client = cursor.next();) { - if (!client->isFromUserConnection()) { - // Don't kill system operations. - continue; - } - - stdx::lock_guard<Client> lk(*client); - OperationContext* toKill = client->getOperationContext(); - - // Don't kill ourself. - if (toKill && toKill->getOpID() != opCtx->getOpID()) { - killOperation(toKill, killCode); - } - } -} - void ServiceContext::unsetKillAllOperations() { _globalKill.store(false); } |