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

Refactor memory tracker ownership to be managed by cursor managers

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Integration
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      It might be simpler, compared to our current approach, to make the cursor managers transfer ownership of the operation memory tracker when cursors are checked out and checked in. It would avoid some of the pitfalls with pipeline lifetimes that we've run afoul of.

      The path we have taken so far with decorators is problematic though, since it inverts the dependency between the memory tracker and the cursor code.

      If we were to make the cursor code call into memory tracker code, we'd need to forego the decorators and just add an optional memory tracker member to the cursors. This seems reasonable to me, and it also makes sense to me that memory tracking should be lower-level layer, as there's no reason that it needs to care about pipelines and cursors.

            Assignee:
            chris.wolff@mongodb.com Chris Wolff
            Reporter:
            chris.wolff@mongodb.com Chris Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: