summaryrefslogtreecommitdiff
path: root/src/mongo/s/chunk_manager.cpp
diff options
context:
space:
mode:
authorRuoxin Xu <ruoxin.xu@mongodb.com>2021-02-02 21:03:25 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-17 11:23:05 +0000
commit5ada96cbe318734f9c7dfa26dea3f28dbe4627bf (patch)
tree5a63211f065b1e40e5eeeb239d241355e1720ffa /src/mongo/s/chunk_manager.cpp
parentd4ff82a11019aef87701db9053499461601e75d6 (diff)
downloadmongo-5ada96cbe318734f9c7dfa26dea3f28dbe4627bf.tar.gz
SERVER-53060 Remove QueryRequest class
Diffstat (limited to 'src/mongo/s/chunk_manager.cpp')
-rw-r--r--src/mongo/s/chunk_manager.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/s/chunk_manager.cpp b/src/mongo/s/chunk_manager.cpp
index 4eca62e5395..1ddbccfe938 100644
--- a/src/mongo/s/chunk_manager.cpp
+++ b/src/mongo/s/chunk_manager.cpp
@@ -384,23 +384,24 @@ void ChunkManager::getShardIdsForQuery(boost::intrusive_ptr<ExpressionContext> e
const BSONObj& query,
const BSONObj& collation,
std::set<ShardId>* shardIds) const {
- auto qr = std::make_unique<QueryRequest>(_rt->optRt->nss());
- qr->setFilter(query);
+ auto findCommand = std::make_unique<FindCommand>(_rt->optRt->nss());
+ findCommand->setFilter(query.getOwned());
if (auto uuid = getUUID())
expCtx->uuid = uuid;
if (!collation.isEmpty()) {
- qr->setCollation(collation);
+ findCommand->setCollation(collation.getOwned());
} else if (_rt->optRt->getDefaultCollator()) {
auto defaultCollator = _rt->optRt->getDefaultCollator();
- qr->setCollation(defaultCollator->getSpec().toBSON());
+ findCommand->setCollation(defaultCollator->getSpec().toBSON());
expCtx->setCollator(defaultCollator->clone());
}
auto cq = uassertStatusOK(
CanonicalQuery::canonicalize(expCtx->opCtx,
- std::move(qr),
+ std::move(findCommand),
+ false, /* isExplain */
expCtx,
ExtensionsCallbackNoop(),
MatchExpressionParser::kAllowAllSpecialFeatures));