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

$unionWith explain loses information from any stages in sub-pipeline which get absorbed into cursor stage

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0, 4.4.2
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • v4.4
    • Query 2020-09-07, Query 2020-09-21
    • 0

      When we explain a pipeline with mode "executionStats" or above, we first execute the pipeline to completion and then serialize the individual stages. If one of those stages is a $unionWith, then the first phase will target and optimize the sub-pipeline, absorbing any possible stages into the $cursor stage. When serialize() is subsequently called against the $unionWith to generate the 'stages' element of explain, we do the same process again except we've lost any stages which were pushed down into the $cursor/$mergeCursors.

            Assignee:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Reporter:
            ted.tuckman@mongodb.com Ted Tuckman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: