[DRIVERS-2501] Break NoWritesPerformed-Only Error Sequence Created: 09/Nov/22  Updated: 05/Dec/22

Status: Implementing
Project: Drivers
Component/s: Retryability
Fix Version/s: None

Type: Bug Priority: Unknown
Reporter: Preston Vasquez Assignee: Preston Vasquez
Resolution: Unresolved Votes: 0
Labels: retryable-writes
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by GODRIVER-2651 Operation returns nil error if origin... Closed
Documented
documents DRIVERS-2504 Extend Retryable Writes "NoWritesPerf... Backlog
Issue split
split to CSHARP-4441 Break NoWritesPerformed-Only Error Se... Backlog
split to CXX-2619 Break NoWritesPerformed-Only Error Se... Backlog
split to RUST-1552 Break NoWritesPerformed-Only Error Se... Backlog
split to PHPLIB-1048 Break NoWritesPerformed-Only Error Se... Closed
split to RUBY-3190 Break NoWritesPerformed-Only Error Se... Closed
split to CDRIVER-4531 Break NoWritesPerformed-Only Error Se... Closed
split to GODRIVER-2670 Break NoWritesPerformed-Only Error Se... Closed
split to MOTOR-1071 Break NoWritesPerformed-Only Error Se... Closed
split to NODE-4864 Break NoWritesPerformed-Only Error Se... Closed
split to PYTHON-3535 Break NoWritesPerformed-Only Error Se... Closed
split to JAVA-4827 Break NoWritesPerformed-Only Error Se... Closed
Related
is related to GODRIVER-2651 Operation returns nil error if origin... Closed
is related to DRIVERS-2327 Propagate Original Error for Write Er... Implementing
Driver Changes: Needed
Downstream Changes Summary:

Drivers should sync unified retryable-writes spec tests to mongodb/specifications@2051f35.

Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4531 Fixed 1.24.0
CXX-2619 Backlog
CSHARP-4441 Backlog
GODRIVER-2670 Duplicate
JAVA-4827 Fixed 4.9.0
NODE-4864 Done 5.4.0
MOTOR-1071 Duplicate
PYTHON-3535 Duplicate
PHPLIB-1048 Works as Designed
RUBY-3190 Fixed 2.19.0
RUST-1552 Backlog
SWIFT-1683 Won't Do

 Description   

In the previous specification for executing retryable writes, there is an edge case where the server only returns errors with the "NoWritesPerformed" error label. If this happens, the following block is unreachable:

      if (originalError is not DriverException && ! originalError.hasErrorLabel("NoWritesPerformed")) {
        previousError = originalError;
      }

In this case, the previousError that will be propagated to the user will be "null". In reality, this routine should propagate the first NoWritesPerformed-labeled error.



 Comments   
Comment by Jeffrey Yemin [ 05/Dec/22 ]

preston.vasquez@mongodb.com julius.park@mongodb.com is it the case that a driver could pass the new test but still have the bug described by this issue, at least until DRIVERS-2504 is addressed?

Comment by Githook User [ 02/Dec/22 ]

Author:

{'name': 'Preston Vasquez', 'email': '24281431+prestonvasquez@users.noreply.github.com', 'username': 'prestonvasquez'}

Message: DRIVERS-2501 Break NoWritesPerformed-Only Error Sequence (#1349)
Branch: master
https://github.com/mongodb/specifications/commit/2051f3522390dd342f5bdd4703145eeb38cfd36f

Comment by Julius Park (Inactive) [ 17/Nov/22 ]

I believe we also need to add cases for some of the following cases:

  1. A NoWritesPerformed error, followed by a ServerSelectionTimeout
  2. An ambiguous error, followed by a NoWritesPerformed error
  3. A NoWritesPerformed error followed by an ambiguous error
  4. Two NoWritesPerformed errors in a row

4 and 2 are implemented by the previous PR and this one, respectively. 

Comment by Jeremy Mikola [ 16/Nov/22 ]

Cross-referencing with:

  • DRIVERS-2327, which introduced "NoWritesPerformed" to the spec in e4a5564
  • DRIVERS-1807, which introduced the line cited in the OP in 343ff9a

preston.vasquez@mongodb.com: Is this likely something that was missed during review in mongodb/specifications#1317? /cc shane.harvey@mongodb.com

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