[SERVER-31782] allow aggregation to take an 'allowPartialResults' option Created: 01/Nov/17  Updated: 18/Jul/23

Status: Backlog
Project: Core Server
Component/s: Querying
Affects Version/s: 3.6.0-rc1
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-3322 sharded aggregations should be very t... Backlog
related to SERVER-17696 Terminate sharded queries immediately... Closed
is related to SERVER-28874 make stale shardVersion error overrid... Closed
is related to SERVER-73557 Add ability for mongos to broadcast t... Closed
Assigned Teams:
Query Optimization
Participants:

 Description   

The infrastructure for this is already in place: it's just a matter of parsing an 'allowPartialResults' option (similar to the find command) and passing it down to establishCursors(), which takes 'allowPartialResults' as a standalone boolean argument that the agg code currently always sets to false.

We should also first double-check that it makes sense to accept allowPartialResults for all aggregations ($facet? $lookup? $graphLookup?).

SERVER-28874 fixed the behavior of 'allowPartialResults' in establishCursors() and added thorough unit testing. It also added a jstest, jstests/sharding/allow_partial_results.js, which explicitly checks that aggregation does not accept the 'allowPartialResults' option, so this ticket should update that test.



 Comments   
Comment by David Sanchez [ 18/Jul/23 ]

This has been requested by a customer today as it's blocking them from using the Aggregation Framework. If they want to display partial results using aggregations, the query is failing currently. Also they mentioned allowPartialResults is not available when using .count() or .distinct()

Comment by Asya Kamsky [ 03/Nov/17 ]

This is a good idea and could help with resolving SERVER-3322 and/or SERVER-17696 (which are two requests currently in conflict with each other, and having this flag would allow behavior in SERVER-3322 when the flag is set and implementing SERVER-17696 when it's not).

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