-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework, Diagnostics, Querying
-
Fully Compatible
-
Query 2020-11-30, Query 2020-12-14
We've seen several cases in the field of $group operations which use $addToSet or $push to create very large arrays. This can lead to the memory footprint being large. In related ticket SERVER-44174, we added a check that will fail a query if a particular $addToSet or $push accumulator's memory consumption exceeds 100MB. However, understanding the memory consumption for a query can still be difficult since there are limited diagnostics in this area.
In order to help users understand which operators in the query plan are consuming memory, we should extend "executionStats" and "allPlansExecution" verbosity explain output for aggregate commands to include the maximum memory footprint attained at query runtime on a per-accumulator basis.
- is related to
-
SERVER-44174 $push and $addToSet should restrict memory usage
- Closed
-
SERVER-48380 Expose total data size in bytes processed by $sort and $group in agg execution stats explain
- Closed
- related to
-
SERVER-53303 Make sort and group execution stages report number of spills to disk in explain
- Closed