[SERVER-44470] Parse aggregation commands earlier, and rationalize aggregation readConcern handling Created: 07/Nov/19  Updated: 29/Oct/23  Resolved: 26/Nov/19

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.3.3

Type: Improvement Priority: Major - P3
Reporter: Kevin Pulo Assignee: Kevin Pulo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-43126 Adjust RC/WC Majority passthrough sui... Closed
is depended on by SERVER-43712 Use RWCDefaults for incoming requests... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2019-11-18, Sharding 2019-12-02
Participants:

 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.



 Comments   
Comment by Githook User [ 02/Dec/19 ]

Author:

{'name': 'Kevin Pulo', 'username': 'devkev', 'email': 'kevin.pulo@mongodb.com'}

Message: SERVER-44470 Use supportsReadConcern() for $out and $merge stages
Branch: master
https://github.com/mongodb/mongo/commit/a8b246e6aca86ce793ea3d405f2457a3901c0bf9

Comment by Githook User [ 26/Nov/19 ]

Author:

{'name': 'Kevin Pulo', 'username': 'devkev', 'email': 'kevin.pulo@mongodb.com'}

Message: SERVER-44470 Parse aggregation commands earlier, and rationalize aggregation readConcern handling
Branch: master
https://github.com/mongodb/mongo/commit/8b0f534a706005d366e200ee56af5c76217656b2

Comment by Githook User [ 26/Nov/19 ]

Author:

{'email': 'kevin.pulo@mongodb.com', 'name': 'Kevin Pulo', 'username': 'devkev'}

Message: SERVER-44470 update LiteParsed supportsReadConcern API
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/3791bfb24185a713b7e1eeb9b1a46148f6d7809c

Generated at Thu Feb 08 05:06:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.