diff options
author | Cheahuychou Mao <mao.cheahuychou@gmail.com> | 2023-03-24 14:37:14 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-03-24 16:22:55 +0000 |
commit | e9359000f0592822929f659bbeb5fe85083c6eb9 (patch) | |
tree | 9e18bec07ffdbc3f1118edbbb05c1e21911ee8a6 /src/mongo/db/service_entry_point_common.cpp | |
parent | 38e6c0baa0307983caac54821c4e68a91af51a6a (diff) | |
download | mongo-e9359000f0592822929f659bbeb5fe85083c6eb9.tar.gz |
SERVER-75092 Make standalone replica set mongods refresh sample rates
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, 5 insertions, 0 deletions
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp index 17833f6be84..ecf8e91ffa4 100644 --- a/src/mongo/db/service_entry_point_common.cpp +++ b/src/mongo/db/service_entry_point_common.cpp @@ -104,6 +104,7 @@ #include "mongo/rpc/metadata/tracking_metadata.h" #include "mongo/rpc/op_msg.h" #include "mongo/rpc/reply_builder_interface.h" +#include "mongo/s/query_analysis_sampler.h" #include "mongo/s/shard_cannot_refresh_due_to_locks_held_exception.h" #include "mongo/s/would_change_owning_shard_exception.h" #include "mongo/transport/hello_metrics.h" @@ -1638,6 +1639,10 @@ void ExecCommandDatabase::_initiateCommand() { if (command->shouldAffectCommandCounter()) { globalOpCounters.gotCommand(); + if (analyze_shard_key::supportsSamplingQueries(opCtx)) { + analyze_shard_key::QueryAnalysisSampler::get(opCtx).gotCommand( + request.getCommandName()); + } } // Parse the 'maxTimeMS' command option, and use it to set a deadline for the operation on the |