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

Parse aggregation commands earlier, and rationalize aggregation readConcern handling

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.3
    • Component/s: Aggregation Framework
    • Labels:
      None

      Description

      Currently aggregation commands are parsed after the CommandInvocation has been created, during run() or explain(). This means that supportsReadConcern() (which gets called before run()/explain()) has to be very broad, accepting the RC for any possible aggregation (with further validation later).

      It would be much better if the AggregationRequest::parseFromBSON() construction was lifted out of PipelineCommand::Invocation::run()/explain() and into PipelineCommand::parse(), because this would allow supportsReadConcern() to consult the AggregationRequest to more accurately indicate if the RC is supported, and more particularly, if the default RC should be applied.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: