Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13201

Investigate changes in SERVER-43996: Make the router return flag in response to indicate if partial results were returned





      Downstream Change Summary

      The "allowPartialResults" option of the "find" command permits a query to run on a sharded cluster even in cases where some of the shards are not available. In this case, the results will consist of the subset of data present on the available shards. However, until now there was no way for a client to know whether the data they received was complete or partial.

      This change adds a new field, "partialResultsReturned", in the "cursor" object returned to the client by the "find" and "getMore" commands. In the event that some of the shards are not available at the time the query is run, or if some shards disconnect while the cursor is being iterated, this field will be present and will have a boolean value of true. If all shards are available, the field will be absent.

      This flag is scoped to the cursor, not to an individual operation; all getMores after the point where a shard disconnects will be flagged as "partialResultsReturned".

      Description of Linked Ticket

      Right now, a user can opt in to getting partial results (that is, ignoring unreachable shards) by passing allowPartialResults: true  in their find command.

      However, they have no way to tell if partial results were actually returned.

      This ticket is to make mongos return a flag in its response if partial results were returned.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)




            kay.kim@mongodb.com Kay Kim (Inactive)
            backlog-server-pm Backlog - Core Eng Program Management Team
            0 Vote for this issue
            2 Start watching this issue


              3 years, 33 weeks, 6 days ago