Use MemoryUsageTracker instead of protected variable in AccumulatorState

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • QE 2023-08-21, QE 2023-09-04
    • 105
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      AccumulatorState just exposes protected variable for derived classes to track the memory usage: https://github.com/mongodb/mongo/blob/master/src/mongo/db/pipeline/accumulator.h#L167 

      It is unsafe and causes memory underflow. We should use MemoryUsageTracker and MemoryTokens instead.

              Assignee:
              Ivan Fefer
              Reporter:
              Ivan Fefer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: