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

Pipeline clone() can lead to dangling opCtx pointers

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 7.0.0-rc0, 6.0.12
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Query Execution
    • Fully Compatible
    • ALL
    • v6.0
    • QE 2023-02-20, QE 2023-03-06

      When a pipeline is cloned() with no argument (treated as a null ExpressionContext), some stages will create their own new expression context.

      The result is a pipeline where the stages do not share the same ExpressionContext, which is wrong.

      This ticket is to
      (a) Fix clone() and define what it means to clone a pipeline without a new operation context. What does it mean for DocumentSources with a sub-pipeline?
      (c) Add invariants to check that the members of a pipeline are using the same ExpressionContext in various places.

            Assignee:
            alyssa.clark@mongodb.com Alyssa Clark
            Reporter:
            ian.boros@mongodb.com Ian Boros
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: