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

Consider moving explain verbosity off AggCommandRequest

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization

      According to the IDL definition, an agg command can be specified with explain: true. This explain parameter is kept on the AggCommandRequest as a verbosity, not a boolean. The conversion from bool to verbosity happens here.

      This is a bit weird. We should consider leaving the explain as a boolean on the AggCommandRequest. As with other commands being explained, this verbosity eventually makes its way down to the expression context. This change would be a step towards simplifying the explain implementation by reducing the number of places we track verbosity and directing callers to look at the expression context instead.

      To make this work, we need another way to pass verbosity down to the expression context. We could do this by adding a new explain verbosity parameter to runAggregate, which would be populated according to the explain on the AggCommandRequest here, and the explain from the ExplainCommandRequest elsewhere (e.g., here).

            Assignee:
            backlog-query-optimization [DO NOT USE] Backlog - Query Optimization
            Reporter:
            hana.pearlman@mongodb.com Hana Pearlman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: