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

Parse aggregation commands earlier, and rationalize aggregation readConcern handling

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

      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@mongodb.com Kevin Pulo
            Reporter:
            kevin.pulo@mongodb.com Kevin Pulo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: