Implement memory tracking for pipeline sort stage

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • Fully Compatible
    • 200
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Implement memory tracking for pipeline sort stage.

      SERVER-104602 is very similar and a good example to look off of (https://github.com/10gen/mongo/pull/37138).

      1. Add memory tracker to document source constructor -Increment and decrement the memory tracker to where DocumentSourceSort allocates and deallocates memory - (take a look at the execution path to get some first ideas but we will go through this together)
      2. Clear memory tracker at the end of execution (generally in doDispose()) 
      3. Add memory metrics to sort's explain output (add to serialize())
      4. Add assertions in unit tests
      5. Add js test
      6. Add sharded js test

              Assignee:
              Aaron Baruch
              Reporter:
              Chris Wolff
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: