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

Propagate Original Error for Write Errors Labeled NoWritesPerformed

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: Retryability
    • None
    • Needed
    • Hide

      Commands which failed with the RetryableWriteError label can now also return a new NoWritesPerformed error label if no writes were performed during the operation of that command.

      Show
      Commands which failed with the RetryableWriteError label can now also return a new NoWritesPerformed error label if no writes were performed during the operation of that command.
    • Hide

      Drivers need to implement a new retryable writes prose test (see mongodb/specifications@e4a5564), and implement operation error handling such that if a retry event fails with an error labeled NoWritesPerformed the original error is propagated.

      Show
      Drivers need to implement a new retryable writes prose test (see mongodb/specifications@e4a5564 ), and implement operation error handling such that if a retry event fails with an error labeled NoWritesPerformed the original error is propagated.
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-4449 Fixed 1.24.0
      CXX-2563 Backlog
      CSHARP-4288 Backlog
      GODRIVER-2516 Done 1.11.0
      JAVA-4701 Done 4.8.0
      NODE-4503 Done 4.11.0
      MOTOR-1013 Duplicate
      PYTHON-3388 Fixed 4.4
      PHPLIB-935 Fixed 1.16.0
      RUBY-3079 Fixed 2.19.0
      RUST-1433 Fixed 2.7.0
      SWIFT-1624 Won't Do
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-4449 Fixed 1.24.0 CXX-2563 Backlog CSHARP-4288 Backlog GODRIVER-2516 Done 1.11.0 JAVA-4701 Done 4.8.0 NODE-4503 Done 4.11.0 MOTOR-1013 Duplicate PYTHON-3388 Fixed 4.4 PHPLIB-935 Fixed 1.16.0 RUBY-3079 Fixed 2.19.0 RUST-1433 Fixed 2.7.0 SWIFT-1624 Won't Do

      Summary

      What is the problem or use case, what are we trying to achieve?

      We have definite (write definitely aborted) and indefinite (write may have committed) errors we return to the client and we do not make it clear which are definite and which are indefinite.

      We want to change the driver spec to return indefinite errors any time it could be indefinite. For example, WriteConcernErrors and SocketExceptions are both indefinite. The Server is in the best position to say (probably via an error label) which errors returned by the server are definite. On bulk writes, NotWritablePrimary is the only definite retryable error. NoSuchTransaction is also definite and handled specially by the driver, though it is not labeled “retriable”. Writes with multi:true are not retryable and thus there is no question about the error a driver should return.

      Error labels were introduced in 4.3.1 by SERVER-43941. For brevity, the prose tests must only run on versions >= 6.0.

      Motivation

      Who is the affected end user?

      Who are the stakeholders?
      Anyone using retryable writes or transaction retryability.

      How does this affect the end user?

      Are they blocked? Are they annoyed? Are they confused?
      If the driver stops retrying for them, they could take an incorrect action and accidentally double commit a write.

      How likely is it that this problem or use case will occur?

      Main path? Edge case?
      This is on the main error path, but with CSOT will become less likely.

      If the problem does occur, what are the consequences and how severe are they?

      Minor annoyance at a log message? Performance concern? Outage/unavailability? Failover can't complete?
      Users may take incorrect action based on unclear information we provide.

      Is this issue urgent?

      Does this ticket have a required timeline? What is it?

      Is this ticket required by a downstream team?

      Needed by e.g. Atlas, Shell, Compass?

      Is this ticket only for tests?

      Does this ticket have any functional impact, or is it just test improvements?
      This has a functional impact.

            Assignee:
            preston.vasquez@mongodb.com Preston Vasquez
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated: