diff options
author | Cheahuychou Mao <mao.cheahuychou@gmail.com> | 2023-03-28 16:06:55 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2023-03-28 19:51:51 +0000 |
commit | 3e44409d23b9924ceca60bb2429382fbcc8fc0c3 (patch) | |
tree | 61cfcf4fc51e174817ae33653826463b2add0c58 /src/mongo/s/cluster_commands_helpers.cpp | |
parent | b5953fbf51dc9b626e33c8fc62eded65f99c6b49 (diff) | |
download | mongo-3e44409d23b9924ceca60bb2429382fbcc8fc0c3.tar.gz |
SERVER-75312 Make sure analyzeShardKey command can handle queries with $expr equality
Diffstat (limited to 'src/mongo/s/cluster_commands_helpers.cpp')
-rw-r--r-- | src/mongo/s/cluster_commands_helpers.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/mongo/s/cluster_commands_helpers.cpp b/src/mongo/s/cluster_commands_helpers.cpp index 11c2e3b68d5..345c4eae3f7 100644 --- a/src/mongo/s/cluster_commands_helpers.cpp +++ b/src/mongo/s/cluster_commands_helpers.cpp @@ -181,13 +181,7 @@ std::vector<AsyncRequestsSender::Request> buildVersionedRequestsForTargetedShard } auto expCtx = make_intrusive<ExpressionContext>(opCtx, std::move(collator), nss); - getShardIdsForQuery(expCtx, - query, - collation, - cm, - &shardIds, - nullptr /* chunkRanges */, - nullptr /* targetMinKeyToMaxKey */); + getShardIdsForQuery(expCtx, query, collation, cm, &shardIds, nullptr /* info */); const auto targetedSampleId = eligibleForSampling ? analyze_shard_key::tryGenerateTargetedSampleId( @@ -662,13 +656,7 @@ std::set<ShardId> getTargetedShardsForQuery(boost::intrusive_ptr<ExpressionConte // The collection is sharded. Use the routing table to decide which shards to target based // on the query and collation. std::set<ShardId> shardIds; - getShardIdsForQuery(expCtx, - query, - collation, - cm, - &shardIds, - nullptr /* chunkRanges */, - nullptr /* targetMinKeyToMaxKey */); + getShardIdsForQuery(expCtx, query, collation, cm, &shardIds, nullptr /* info */); return shardIds; } |