Clarify `NoWritesPerformed` error label behavior when multiple retries occur

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Component/s: Backpressure
    • None
    • Needed
    • Hide

      IngressRequestRateLimitExceeded errors now include the NoWritesPerformed error label. No drivers changes should be needed to account for this as the existing retry logic should handle it, however.

      Show
      IngressRequestRateLimitExceeded errors now include the NoWritesPerformed error label. No drivers changes should be needed to account for this as the existing retry logic should handle it, however.
    • Hide

      Summary of necessary driver changes

      The changes in this PR are only relevant in drivers which might retry more than once. This currently is only CSOT or drivers up-to-date with client backpressure. The tests rely on the updated operation retry loop as defined here.

      This work has to be done with DRIVERS-3239

      Commits for syncing spec/prose tests
      (and/or refer to an existing language POC if needed)

      Context for other referenced/linked tickets

      •  
      Show
      Summary of necessary driver changes The changes in this PR are only relevant in drivers which might retry more than once. This currently is only CSOT or drivers up-to-date with client backpressure. The tests rely on the updated operation retry loop as defined here . This work has to be done with DRIVERS-3239 .  code changes: Drivers with CSOT: Drivers should audit their error handling for retryable writes to make sure they are compliant with the clarifications outlined in the linked commit. Drivers without CSOT: Drivers should ensure their implemention of error handling for DRIVERS-3239 is compliant with the changes in  https://github.com/mongodb/specifications/commit/434f5d6d989202002e5a786d86b36a32a5168cde tests: Implement three new retryable writes prose tests. Commits for syncing spec/prose tests (and/or refer to an existing language POC if needed) https://github.com/mongodb/specifications/commit/434f5d6d989202002e5a786d86b36a32a5168cde Context for other referenced/linked tickets  
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-6195 Blocked
      CXX-3397 Backlog
      CSHARP-5831 Ready for Work
      GODRIVER-3757 Backlog
      JAVA-6055 Blocked
      NODE-7366 In Progress
      PYTHON-5695 In Code Review
      PHPLIB-1766 Backlog
      RUBY-3755 Backlog
      RUST-2335 Backlog
      $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 */ } #scriptField td.willNotDo { background-color: #FF0000; /* Red color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-6195 Blocked CXX-3397 Backlog CSHARP-5831 Ready for Work GODRIVER-3757 Backlog JAVA-6055 Blocked NODE-7366 In Progress PYTHON-5695 In Code Review PHPLIB-1766 Backlog RUBY-3755 Backlog RUST-2335 Backlog

      The retryable write specification's phrasing about NoWritesPerformed error labels is confusing in a driver that can retry more than once:

      If a retry attempt fails with an error labeled NoWritesPerformed, drivers MUST return the original error.

      This reads like: "If a driver encounters an error labeled NoWritesPerformed, the driver MUST immediately return the previously encountered error.".  However, the correct behavior would be to return the most recently encountered meaningful error, something like:

      If a driver encounters an error labeled NoWritesPerformed, the driver MUST immediately return the most recent encountered error without the NoWritesPerformed label. If all server errors are labeled NoWritesPerformed, then the first error should be raised.

      (see https://mongodb.slack.com/archives/C05P3MKT23E/p1767906271097399).  

      The Node driver currently has this bug when CSOT is enabled, preventing multiple retries if a retry attempt's error contains a NoWritesPerformed error label even when timeoutMS has not expired.

      This behavior needs to be fixed before client backpressure is released - otherwise, drivers won't retry load shed errors more than once.

       

      Acceptance Criteria

      • Clarify the correct behavior for handling NoWritesPerformed error labels when multiple retry attempts are performed.
      • If possible, add a test to enforce this behavior.  

            Assignee:
            Bailey Pearson
            Reporter:
            Shane Harvey
            Daria Pardue Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: