Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-49027

Extend $group explain execution stats to report memory consumption per accumulator

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query 2020-11-30, Query 2020-12-14

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ruoxin.xu Ruoxin Xu
              Reporter:
              david.storch David Storch
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: