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

Use agg::Pipeline for generating explain output

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      The explain command relies on the DocumentSource::serializeToArray() virtual method, which will remain in the DocumentSource class hierarchy. However, starting from a certain verbosity level of the explain command, it also requires common and specific execution statistics, which will be moved to the agg::Stage class hierarchy.

      The output of the explain command should stay unchanged during and by the end of this project. An instance of Pipeline class will co-exist with the corresponding instance of agg::Pipeline for producing the expected explain command output.

      Although at this point both Pipeline and agg::Pipeline share all the sources=stages, the goal of this ticket is to collect the execution statistics from the agg::Pipeline and merge, as if the stages were not shared.

      Relevant prototype commit for the reference (might not fully match the current design): https://github.com/10gen/mongo/pull/34036/commits/89b3adeda666e2da88cf61f01828d38c5ff099b4

      We need to be mindful about possible performance regressions and explain output changes on this one.

            Assignee:
            Unassigned Unassigned
            Reporter:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: