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

Write unit test which re-uses operation context to execute pipeline with $_internalJsEmit expression multiple times

    • Query Optimization
    • 104

      BF-27689 and BF-27079 are both caused by JsExecution being a decoration on the OperationContext, which can be re-used for multiple pipeline executions: in one case due to retries for StaleDbVersion exceptions, and in other case for subplanning in the multiplanner.

      The error comes from the fact that the query code likely assumes that a single OperationContext will only ever be associated with a single pipeline and thus did not expect reuse with the same opCtx.

      We should write a simple unit test which reuses the opCtx to execute two pipelines that use $_internalJsEmit to serve as a simple regression test for both of these BFs.

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            ben.shteinfeld@mongodb.com Ben Shteinfeld
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: