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

Add memory tracking for compile-time size of SBE plan

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 5.1.0
    • Fix Version/s: 5.1.0-rc0
    • Component/s: Query Planning
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      QE 2021-08-23, QE 2021-09-06, QO 2021-09-20
    • Linked BF Score:
      165

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: