You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
find: allowPartialResults option has no coverage #723
allowPartialResults is a documented find option with no coverage anywhere in the repository.
$ grep -rl --include='*.py' "allowPartialResults" documentdb_tests/
(no results)
$ grep -rl --include='*.py' -i "allow_partial" documentdb_tests/
(no results)
Every other option in the find options table is exercised somewhere — sort, projection, limit, skip, hint, min, max, let, comment, collation, readConcern, returnKey, showRecordId, noCursorTimeout, tailable, awaitData, allowDiskUse, singleBatch, maxTimeMS, explain. allowPartialResults is the only one absent.
Suggested coverage
tests/core/query_and_write/commands/find/:
accepted as true and as false on a normal find
BSON type matrix: non-boolean values (string, int, double, null, array, document) accepted or rejected per the engine's validation
interaction with tailable / awaitData, matching how the neighbouring option tests are structured
Note on scope
allowPartialResults only has observable effect when a queried shard is unreachable, so on a single-node or fully healthy deployment it is effectively a no-op. The value here is asserting that it is accepted and validated rather than silently rejected or type-checked inconsistently — not reproducing the partial-result condition itself.
Two neighbouring options were checked and are not gaps, recorded here so they are not re-reported:
maxAwaitTimeMS — no literal occurrences, but the behaviour is covered. It maps to maxTimeMS on getMore for a tailable awaitData cursor, which core/cursors/tailable_cursors/test_tailable_cursors_awaitdata.py tests directly ("getMore with maxTimeMS on an awaitData cursor returns empty batch").
bsonRegExp — shell-side output formatting rather than a wire field, so it has no server behaviour to assert.
Closing — allowPartialResults is a sharded-collection option, so there is nothing meaningful to assert here.
Per the find command reference, it "allows the command (or subsequent getMore commands) to return partial results instead of an error if one or more queried shards are unavailable," and a partial result is signalled by cursor.partialResultsReturned in the response. Both the option and its output field only have observable behaviour when a queried shard is unreachable, which this suite's deployments do not exercise.
Its absence from the test suite is therefore expected rather than a coverage gap.
Activity
eerxuan commentedon Sep 18, 2026
Closing —
allowPartialResultsis a sharded-collection option, so there is nothing meaningful to assert here.Per the
findcommand reference, it "allows the command (or subsequentgetMorecommands) to return partial results instead of an error if one or more queried shards are unavailable," and a partial result is signalled bycursor.partialResultsReturnedin the response. Both the option and its output field only have observable behaviour when a queried shard is unreachable, which this suite's deployments do not exercise.Its absence from the test suite is therefore expected rather than a coverage gap.