From 4dd9956c60337535a4312831c65129d66ffeb3fb Mon Sep 17 00:00:00 2001 From: Gregory Noma Date: Wed, 26 Oct 2022 13:18:07 +0000 Subject: SERVER-70725 Narrow errors resulting in `CollectionUUIDMismatch` in cluster aggregate (cherry picked from commit 85a50585a0b5ea5b174dbb0c8678a85d68ac5d4e) --- src/mongo/s/query/cluster_aggregate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mongo/s/query/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp index 99dff9da625..ae2f7a87e65 100644 --- a/src/mongo/s/query/cluster_aggregate.cpp +++ b/src/mongo/s/query/cluster_aggregate.cpp @@ -334,7 +334,8 @@ Status ClusterAggregate::runAggregate(OperationContext* opCtx, request.getNamespace().coll().toString(), boost::none), "Database does not exist", - !request.getCollectionUUID()); + executionNsRoutingInfoStatus != ErrorCodes::NamespaceNotFound || + !request.getCollectionUUID()); if (liteParsedPipeline.startsWithCollStats()) { uassertStatusOKWithContext(executionNsRoutingInfoStatus, -- cgit v1.2.1