diff options
author | mathisbessamdb <mathis.bessa@mongodb.com> | 2023-05-16 19:16:55 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-05-17 00:07:45 +0000 |
commit | f686154c7dcab57316dba532f06d41201fba6b82 (patch) | |
tree | ccc75de1cce3a082db63575eab66f4c7483f1bbb /src/mongo/db/service_entry_point_common.cpp | |
parent | f8937c0ae6a1b6afd3d0e4e4dae2afca53cf7390 (diff) | |
download | mongo-f686154c7dcab57316dba532f06d41201fba6b82.tar.gz |
SERVER-76900 ResourceConsumption::shouldCollectMetricsForDatabase to pass a DatabaseName
Diffstat (limited to 'src/mongo/db/service_entry_point_common.cpp')
-rw-r--r-- | src/mongo/db/service_entry_point_common.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp index 11a859255fb..f39f599eeb7 100644 --- a/src/mongo/db/service_entry_point_common.cpp +++ b/src/mongo/db/service_entry_point_common.cpp @@ -1510,7 +1510,10 @@ void ExecCommandDatabase::_initiateCommand() { // Connections from mongod or mongos clients (i.e. initial sync, mirrored reads, etc.) should // not contribute to resource consumption metrics. const bool collect = command->collectsResourceConsumptionMetrics() && !_isInternalClient(); - _scopedMetrics.emplace(opCtx, dbname, collect); + _scopedMetrics.emplace( + opCtx, + DatabaseNameUtil::deserialize(request.getValidatedTenantId(), request.getDatabase()), + collect); const auto allowTransactionsOnConfigDatabase = (serverGlobalParams.clusterRole.has(ClusterRole::ConfigServer) || |