[DOCS-14941] [SERVER] Investigate changes in SERVER-53771: $facet should report its summary stats Created: 18/Nov/21  Updated: 13/Nov/23  Resolved: 11/May/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: 5.2.0, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-53771 $facet should report its summary stats Closed
Participants:
Days since reply: 38 weeks, 6 days ago

 Description   
Downstream Change Summary

In this ticket, we've modified the explain output for aggregations using $facet. If the explain verbosity is allPlansExecution or above, we will add total aggregate execution stats for the $facet stage to the output. The specific stats are an accumulation of the stats for the sub-stages contained within the $facet, similar to how plan summary stats are shared for $unionWith.

Description of Linked Ticket

$facet current does not report its plan summary stats currently. The problem is similar to the work been done on $lookup, $sort, and $unionWith.

The problem of not reporting such stats becomes more visible when $facet is present as a sub-pipeline and the top-level pipeline is been asked to report its aggregated summary stats. In this current scenario, $facet will not be able to report such stats, and hence, the top-level pipeline will also report incorrect stats.

A client could also ask for stats directly from $facet if it is present as a top-level pipeline and this will also report incorrect stats.

The infra for the same is already available in the current code-base where each derived document source should override the DocumentSource::getSpecificStats() method, if required. SpecificStats base class has a helper method accumulate() which is a convenient method to gather the summary stats from foreign DocumentSources.

 

In this ticket, we should utilize the current infra and $facet should start reporting its stats.

 



 Comments   
Comment by Sarah Olson [ 11/May/23 ]

I am closing this ticket due to the age of the ticket and because of the relatively small user impact of the requested documentation. 

Comment by PM Bot [ 18/Nov/21 ]

Downstream changes updated for upstream SERVER-53771:
In this ticket, we've modified the explain output for aggregations using $facet. If the explain verbosity is allPlansExecution or above, we will add total aggregate execution stats for the $facet stage to the output. The specific stats are an accumulation of the stats for the sub-stages contained within the $facet, similar to how plan summary stats are shared for $unionWith.

Generated at Thu Feb 08 08:11:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.