PlanExecutor::Deleter can install wrong opCtx pointer

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      PlanExecutor::Deleter can use a wrong/stale opCtx pointer when it deletes the executor.
      The opCtx pointer is only set initially when the PlanExecutor instance is first created, but never updated afterwards.

      When the deleter is invoked, it will call the PlanExecutor 's dispose() method with its own opCtx pointer here, unless the deletion was already dismissed by a call to dismissDisposal() on the deleter.

      Although this seems to mostly work, it is a potential risk and complicates the creation and usage of PlanExecutor instances.
      We should try to get rid of the custom deleter altogether, as we did for the customer deleter of the Pipeline class before in SERVER-107007.

              Assignee:
              Unassigned
              Reporter:
              Jan Steemann
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: