[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: |
|
||||||||||||
| 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: |
| Comment by Githook User [ 26/Nov/19 ] |
|
Author: {'name': 'Kevin Pulo', 'username': 'devkev', 'email': 'kevin.pulo@mongodb.com'}Message: |
| Comment by Githook User [ 26/Nov/19 ] |
|
Author: {'email': 'kevin.pulo@mongodb.com', 'name': 'Kevin Pulo', 'username': 'devkev'}Message: |