[DRIVERS-801] Make the router return flag in response to indicate if partial results were returned Created: 23/Dec/19  Updated: 27/May/22  Resolved: 14/Apr/20

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-43996 Make the router return flag in respon... Closed
Duplicate
duplicates DRIVERS-786 Make the router return flag in respon... Backlog
Related
related to DOCS-13201 Investigate changes in SERVER-43996: ... Closed
Server Compat: 4.3
Upstream Changes 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   
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.



 Comments   
Comment by Esha Bhargava [ 14/Apr/20 ]

Dup of DRIVERS-786

Generated at Thu Feb 08 08:22:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.