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

Use MemoryUsageTracker instead of protected variable in AccumulatorState

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 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

      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@mongodb.com Ivan Fefer
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: