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

Add memory tracking for compile-time size of SBE plan

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: 5.1.0
    • Component/s: Query Planning
    • None
    • Fully Compatible
    • QE 2021-08-23, QE 2021-09-06, QO 2021-09-20
    • 165

      *strong text*The new SBE plan cache will be bounded by a number of bytes rather than a number of cache entries, using an LRU replacement policy. As preparatory work to support this behavior, we need to be able to estimate the size of an SBE tree. The goal of this ticket is to add such a capability, so that it can be used for the SBE plan cache later.

      We wish to calculate the "compile-time size", meaning the size of the SBE tree before it has been prepared or executed. This is because SBE trees will be stored in the plan cache in an unprepared, unexecuted state. The size should incorporate all of the sbe::PlanStage objects, as well as any expression trees they own, or any other resources owned by the sbe::PlanStage.

            Assignee:
            alexander.ignatyev@mongodb.com Alexander Ignatyev
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: