[DRIVERS-2090] Discuss errors that may interrupt a bulk write regardless of ordering Created: 24/Oct/17  Updated: 29/Jun/22

Status: Backlog
Project: Drivers
Component/s: CRUD
Fix Version/s: None

Type: Spec Change Priority: Major - P3
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to DRIVERS-716 Improved Bulk Write API Designing
related to DRIVERS-2093 How should drivers handle multiple Wr... Backlog
related to DRIVERS-2159 How should drivers handle non-write e... Backlog
Driver Changes: Needed

 Description   

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


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