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".