Parse aggregation commands earlier, and rationalize aggregation readConcern handling

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.3.3
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • Sharding 2019-11-18, Sharding 2019-12-02
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

              Assignee:
              Kevin Pulo
              Reporter:
              Kevin Pulo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: