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

XMLWordPrintableJSON

    • Query Optimization
    • 104
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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:
              [DO NOT USE] Backlog - Query Optimization
              Reporter:
              Ben Shteinfeld
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: