diff options
Diffstat (limited to 'src/mongo/s/commands/cluster_count_cmd.cpp')
-rw-r--r-- | src/mongo/s/commands/cluster_count_cmd.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mongo/s/commands/cluster_count_cmd.cpp b/src/mongo/s/commands/cluster_count_cmd.cpp index 22c69d70e43..cf8f22a44fd 100644 --- a/src/mongo/s/commands/cluster_count_cmd.cpp +++ b/src/mongo/s/commands/cluster_count_cmd.cpp @@ -129,11 +129,11 @@ public: auto aggCmdOnView = uassertStatusOK(countCommandAsAggregationCommand(countRequest, nss)); auto aggCmdOnViewObj = OpMsgRequest::fromDBAndBody(nss.db(), aggCmdOnView).body; - auto aggRequestOnView = uassertStatusOK(aggregation_request_helper::parseFromBSON( + auto aggRequestOnView = aggregation_request_helper::parseFromBSON( nss, aggCmdOnViewObj, boost::none, - APIParameters::get(opCtx).getAPIStrict().value_or(false))); + APIParameters::get(opCtx).getAPIStrict().value_or(false)); auto resolvedAggRequest = ex->asExpandedViewAggregation(aggRequestOnView); auto resolvedAggCmd = @@ -248,15 +248,12 @@ public: aggCmdOnViewObj, 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(), |