diff options
author | Cheahuychou Mao <mao.cheahuychou@gmail.com> | 2022-11-03 23:23:38 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-03 23:55:23 +0000 |
commit | b0066d87550ca3cd20f2aa2a6fd67f5e2d292be9 (patch) | |
tree | 21061098fdc4d1d5046bd9453dadc0e11f0b42b8 /src/mongo/s/mongos_main.cpp | |
parent | d93e885253de90b0157de5f5a225e3ff390f0cfe (diff) | |
download | mongo-b0066d87550ca3cd20f2aa2a6fd67f5e2d292be9.tar.gz |
SERVER-69801 Support sampling find, count and distinct queries on sharded clusters
Diffstat (limited to 'src/mongo/s/mongos_main.cpp')
-rw-r--r-- | src/mongo/s/mongos_main.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mongo/s/mongos_main.cpp b/src/mongo/s/mongos_main.cpp index 115abcaba2c..d365a2661fe 100644 --- a/src/mongo/s/mongos_main.cpp +++ b/src/mongo/s/mongos_main.cpp @@ -793,6 +793,8 @@ ExitCode runMongosServer(ServiceContext* serviceContext) { return ExitCode::processHealthCheck; } + srand((unsigned)(curTimeMicros64()) ^ (unsigned(uintptr_t(&opCtx)))); + if (analyze_shard_key::isFeatureFlagEnabled()) { LOGV2_OPTIONS(6973900, {LogComponent::kDefault}, "Starting the QueryAnalysisSampler"); analyze_shard_key::QueryAnalysisSampler::get(serviceContext).onStartup(); |