-
Type: Spec Change
-
Resolution: Fixed
-
Priority: Unknown
-
None
-
Component/s: CRUD
-
None
-
Not Needed
Summary
Write Results states that the acknowledged property on result objects exists for languages that do not return an optional type. This implies that those write methods should actually be documented as returning an optional (e.g. bulkWrite should return Optional<BulkWriteResult>). Note that findAndModify operations may need similar clarifications (permitting an optional or null return value), as the spec currently documents those methods are returning a non-optional Document (findAndModify with {w:0} comes back with a {ok:1} response and would not have any document to return).
This came up while working on DRIVERS-1340.
Motivation
Who is the affected end user?
Driver authors. This ticket is strictly a clarification and should have no impact on driver APIs or users.
Is this issue urgent?
No.
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
No. This ticket only pertains to the spec language. Any unified tests that do assert results for unacknowledged writes should utilize $unsetOrMatches on the expected result.
- is related to
-
DRIVERS-1340 Allow hint for unacknowledged writes using OP_MSG when supported by the server
- Implementing