summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/service_context.cpp')
-rw-r--r--src/mongo/db/service_context.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/service_context.cpp b/src/mongo/db/service_context.cpp
index b4eda7a9b3d..c124cf751f6 100644
--- a/src/mongo/db/service_context.cpp
+++ b/src/mongo/db/service_context.cpp
@@ -332,6 +332,7 @@ void ServiceContext::setKillAllOperations() {
// Ensure that all newly created operation contexts will immediately be in the interrupted state
_globalKill.store(true);
+ auto opsKilled = 0;
// Interrupt all active operations
for (auto&& client : _clients) {
@@ -339,9 +340,13 @@ void ServiceContext::setKillAllOperations() {
auto opCtxToKill = client->getOperationContext();
if (opCtxToKill) {
killOperation(lk, opCtxToKill, ErrorCodes::InterruptedAtShutdown);
+ opsKilled++;
}
}
+ // Shared by mongos and mongod shutdown code paths
+ LOGV2(4695300, "Interrupted all currently running operations", "opsKilled"_attr = opsKilled);
+
// Notify any listeners who need to reach to the server shutting down
for (const auto listener : _killOpListeners) {
try {