diff options
Diffstat (limited to 'src/mongo/db/commands/write_commands.cpp')
-rw-r--r-- | src/mongo/db/commands/write_commands.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/commands/write_commands.cpp b/src/mongo/db/commands/write_commands.cpp index 0ddf1c96316..daf86320f19 100644 --- a/src/mongo/db/commands/write_commands.cpp +++ b/src/mongo/db/commands/write_commands.cpp @@ -1559,6 +1559,9 @@ public: if (update.getArrayFilters()) { CmdUpdate::updateMetrics.incrementExecutedWithArrayFilters(); } + if (update.getMulti()) { + updateManyCount.increment(1); + } } return updateReply; @@ -1717,6 +1720,13 @@ public: std::move(reply), &deleteReply); + // Collect metrics. + for (auto&& deletes : request().getDeletes()) { + if (deletes.getMulti()) { + deleteManyCount.increment(1); + } + } + return deleteReply; } catch (const DBException& ex) { NotPrimaryErrorTracker::get(opCtx->getClient()).recordError(ex.code()); |