Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2090

Discuss errors that may interrupt a bulk write regardless of ordering

    • Type: Icon: Spec Change Spec Change
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 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).

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: