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

QueryPlannerAccess should hold owned pointers by unique_ptr rather than raw pointer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.19, 3.6.10, 4.0.6, 4.1.1
    • Component/s: Querying
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.0, v3.6, v3.4
    • Sprint:
      Query 2018-06-18
    • Case:
    • Linked BF Score:
      5

      Description

      planner_access.cpp has quite a few uses of owned raw pointers which need to be cleaned up. This code is not exception safe, and our testing infrastructure has proven that it can leak memory in obscure error cases. Furthermore, implementation errors in the planner that would lead to query-fatal exceptions have the additional adverse consequence of leaking memory. Finally, fixing this will make it easier to move towards having the planner propagate errors by exception instead of Status.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: