diff options
Diffstat (limited to 'src/mongo/db/commands/run_aggregate.cpp')
-rw-r--r-- | src/mongo/db/commands/run_aggregate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp index 98a332ff145..3ecab3a4b47 100644 --- a/src/mongo/db/commands/run_aggregate.cpp +++ b/src/mongo/db/commands/run_aggregate.cpp @@ -287,7 +287,7 @@ StatusWith<StringMap<ExpressionContext::ResolvedNamespace>> resolveInvolvedNames // from a $merge to a collection in a different database. Since we cannot write to // views, simply assume that the namespace is a collection. resolvedNamespaces[involvedNs.coll()] = {involvedNs, std::vector<BSONObj>{}}; - } else if (!db || db->getCollection(opCtx, involvedNs)) { + } else if (!db || CollectionCatalog::get(opCtx).lookupCollectionByNamespace(involvedNs)) { // If the aggregation database exists and 'involvedNs' refers to a collection namespace, // then we resolve it as an empty pipeline in order to read directly from the underlying // collection. If the database doesn't exist, then we still resolve it as an empty @@ -338,7 +338,7 @@ Status collatorCompatibleWithPipeline(OperationContext* opCtx, return Status::OK(); } for (auto&& potentialViewNs : liteParsedPipeline.getInvolvedNamespaces()) { - if (db->getCollection(opCtx, potentialViewNs)) { + if (CollectionCatalog::get(opCtx).lookupCollectionByNamespace(potentialViewNs)) { continue; } |