summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_distinct_cmd.cpp
diff options
context:
space:
mode:
authorsamontea <merciers.merciers@gmail.com>2021-02-08 19:00:08 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-08 21:18:33 +0000
commit6a5e743910ad6b2d9aea53aae046b2a0b63d3198 (patch)
tree65d4b37df29bc0cc1530513fc5d1d684339ab24f /src/mongo/s/commands/cluster_distinct_cmd.cpp
parent19940de8b056ec9441c97f824e7adc508b444a40 (diff)
downloadmongo-6a5e743910ad6b2d9aea53aae046b2a0b63d3198.tar.gz
SERVER-53127 Let AggregationRequestHelper::parseFromBSON() return an AggregateCommand
Diffstat (limited to 'src/mongo/s/commands/cluster_distinct_cmd.cpp')
-rw-r--r--src/mongo/s/commands/cluster_distinct_cmd.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mongo/s/commands/cluster_distinct_cmd.cpp b/src/mongo/s/commands/cluster_distinct_cmd.cpp
index 7d1e5bc7c0b..7e695d526e2 100644
--- a/src/mongo/s/commands/cluster_distinct_cmd.cpp
+++ b/src/mongo/s/commands/cluster_distinct_cmd.cpp
@@ -138,15 +138,13 @@ public:
viewAggCmd,
verbosity,
APIParameters::get(opCtx).getAPIStrict().value_or(false));
- if (!aggRequestOnView.isOK()) {
- return aggRequestOnView.getStatus();
- }
+
auto bodyBuilder = result->getBodyBuilder();
// An empty PrivilegeVector is acceptable because these privileges are only checked on
// getMore and explain will not open a cursor.
return ClusterAggregate::retryOnViewError(opCtx,
- aggRequestOnView.getValue(),
+ aggRequestOnView,
*ex.extraInfo<ResolvedView>(),
nss,
PrivilegeVector(),
@@ -216,9 +214,8 @@ public:
viewAggCmd,
boost::none,
APIParameters::get(opCtx).getAPIStrict().value_or(false));
- uassertStatusOK(aggRequestOnView.getStatus());
- auto resolvedAggRequest = ex->asExpandedViewAggregation(aggRequestOnView.getValue());
+ auto resolvedAggRequest = ex->asExpandedViewAggregation(aggRequestOnView);
auto resolvedAggCmd =
aggregation_request_helper::serializeToCommandObj(resolvedAggRequest);