Investigate changes in SERVER-31782: allow aggregation to take an 'allowPartialResults' option

XMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Developer Tools

      Original Downstream Change Summary

      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.

            Assignee:
            Unassigned
            Reporter:
            Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: