diff options
author | ruslan.abdulkhalikov <ruslan.abdulkhalikov@mongodb.com> | 2021-03-20 23:06:24 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-03-23 00:54:19 +0000 |
commit | 20c01a9f4cd201662f9d67f3974fd85df0979186 (patch) | |
tree | 1a2ba807d9d375dbe74098b899e311b0a22b5c54 /src/mongo/s/query/cluster_aggregate.cpp | |
parent | a742fad3f4a9376a665fb359971f0457e5dcc101 (diff) | |
download | mongo-20c01a9f4cd201662f9d67f3974fd85df0979186.tar.gz |
SERVER-53083 collStats results depend on topology and option
Diffstat (limited to 'src/mongo/s/query/cluster_aggregate.cpp')
-rw-r--r-- | src/mongo/s/query/cluster_aggregate.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/s/query/cluster_aggregate.cpp b/src/mongo/s/query/cluster_aggregate.cpp index b072a7d7237..4c78d8b8bd6 100644 --- a/src/mongo/s/query/cluster_aggregate.cpp +++ b/src/mongo/s/query/cluster_aggregate.cpp @@ -256,11 +256,11 @@ Status ClusterAggregate::runAggregate(OperationContext* opCtx, auto executionNsRoutingInfoStatus = sharded_agg_helpers::getExecutionNsRoutingInfo(opCtx, namespaces.executionNss); - // For consistency, we assert that when running a pipeline with collStats as the source and a - // count parameter that the collection exists. - if (liteParsedPipeline.startsWithCollStatsWithCount()) { - uassertStatusOKWithContext(executionNsRoutingInfoStatus, - "Unable to retrieve queryExecStats in $collStats stage"); + if (!executionNsRoutingInfoStatus.isOK()) { + if (liteParsedPipeline.startsWithCollStats()) { + uassertStatusOKWithContext(executionNsRoutingInfoStatus, + "Unable to retrieve information for $collStats stage"); + } } if (executionNsRoutingInfoStatus.isOK()) { |