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

Allow values owned by an SBE Array or ArraySet to be extracted via a move operation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.0.0-rc0
    • Affects Version/s: None
    • Component/s: Query Execution
    • Labels:
      None
    • Fully Compatible
    • QE 2023-02-06, QE 2023-02-20, QE 2023-03-06, QE 2023-03-20, QE 2023-04-03

      The constituent values of an SBE value::Array or value::ArraySet are always owned by the array. Imagine that a caller wants to assume ownership of one of these constituent values. At the moment, the only way that the caller can do so is to make a copy. The goal of this ticket is to improve the API to allow moving values of out a value::Array or value::ArraySet.

      Such an API is dangerous and should be used with caution. The caller must be certain that they have ownership of the value::Array or value::ArraySet, since this precludes the possibility of other code holding a view into the array that would be invalidated by the move operation.

            Assignee:
            martin.neupauer@mongodb.com Martin Neupauer
            Reporter:
            david.storch@mongodb.com David Storch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: