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

SBE value lifetime makes unnecessary copy of data

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.4
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • QE 2024-09-30
    • 200

      When a $let variable is assigned to a FillEmpty expression around a global value, the lifetime tracker correctly assumes that the result of the expression could be a local value, and any usage of that variable is treated as an unsafe reference. This leads to extra copying of data values at runtime, and a performance degradation.

      When the alternative value is a shallow type (e.g. Null, an integer,...) the data is safe and we can treat it as a global value

            Assignee:
            alberto.massari@mongodb.com Alberto Massari
            Reporter:
            alberto.massari@mongodb.com Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: