-
Type:
Investigation
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Developer Tools
We added an allowPartialResults option to the aggregate command, similarly to how the find command accepts such an option.
For aggregations against a sharded collection, this allows the command (or any subsequent getMore commands) to return partial results instead of an error if one or more queried shards for the top-level aggregation are unavailable.
Description of Linked Ticket
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.
- depends on
-
SERVER-31782 allow aggregation to take an 'allowPartialResults' option
-
- Closed
-