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

See if there is a better alternative to using ValueGuard in SBE tests

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query Execution

      In the course of working on SERVER-49226 and SERVER-49225 (which introduced some new unittest frameworks for SBE), there were some questions about the best way to manage the lifetime of SBE values and ensure they are freed at the appropriate time when writing unittests (with a particular interest in RAII mechanisms).

      At present, there are a number of places where the ValueGuard class (an RAII mechanism) is being used ensure SBE values are freed at the appropriate time, and SBE value lifetime is managed using manual logic around call sites (for an example of this, see runTest() in "sbe_plan_stage_test.cpp").

      The goal of this task is to explore whether we can do better.

            Assignee:
            backlog-query-execution [DO NOT USE] Backlog - Query Execution
            Reporter:
            andrew.paroski@mongodb.com Drew Paroski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: