diff options
Diffstat (limited to 'src/mongo/s/analyze_shard_key_util.cpp')
-rw-r--r-- | src/mongo/s/analyze_shard_key_util.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/s/analyze_shard_key_util.cpp b/src/mongo/s/analyze_shard_key_util.cpp index 88e78ee7abb..dad7139f9a0 100644 --- a/src/mongo/s/analyze_shard_key_util.cpp +++ b/src/mongo/s/analyze_shard_key_util.cpp @@ -59,7 +59,13 @@ bool supportsPersistingSampledQueriesIgnoreFCV() { } bool supportsSamplingQueries() { - return isFeatureFlagEnabled() && isMongos(); + return isFeatureFlagEnabled() && + (isMongos() || serverGlobalParams.clusterRole == ClusterRole::ShardServer); +} + +bool supportsSamplingQueriesIgnoreFCV() { + return isFeatureFlagEnabledIgnoreFCV() && + (isMongos() || serverGlobalParams.clusterRole == ClusterRole::ShardServer); } } // namespace analyze_shard_key |