-
Type: Spec Change
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Component/s: CRUD
-
None
-
Needed
In Retrying Write Commands, the retryable writes spec states:
In the case of a multi-statement write operation split across multiple write commands, a failed retry attempt will also interrupt execution of any additional write operations in the batch (regardless of the ordered option). This is no different than if a retryable error had been encountered without retryable behavior enabled or supported by the driver.
In the context of the CRUD spec, multi-statement write operations are insertMany() and bulkWrite() (ordered and unordered alike).
AFAIK, most drivers do abort bulk writes after retryable errors (i.e. network error, "not master" exception) and other "hard stop" errors (e.g. no socket available from the connection pool). However, this behavior does not appear to be documented in any specification.
The Bulk Write spec's On Errors section does discuss an authentication error aborting a bulk write before the first write is sent, but it doesn't talk about "hard stop" errors occurring in the midst of a bulk write (e.g. on the third of five write commands in a batch).
This issue relates to the driver's ability to relay incomplete bulk write results to the user after an interruption (see: SPEC-971).
- related to
-
DRIVERS-716 Improved Bulk Write API
- In Progress
-
DRIVERS-2159 How should drivers handle non-write errors in Unordered Bulk Writes?
- Backlog
-
DRIVERS-2093 How should drivers handle multiple WriteConcernErrors in a bulk operation
- Closed