[DRIVERS-601] Drivers should use majority write concern when retrying commitTransaction Created: 25/Jan/19  Updated: 28/Oct/23  Resolved: 13/May/21

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

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

Issue Links:
Depends
depends on CDRIVER-2936 Drivers should use majority write con... Closed
depends on CSHARP-2493 Drivers should use majority write con... Closed
depends on CXX-1719 Drivers should use majority write con... Closed
depends on GODRIVER-790 Drivers should use majority write con... Closed
depends on MOTOR-305 Drivers should use majority write con... Closed
depends on NODE-1848 Drivers should use majority write con... Closed
depends on PHPC-1319 Drivers should use majority write con... Closed
depends on PYTHON-1730 Drivers should use majority write con... Closed
depends on RUBY-1689 Drivers should use majority write con... Closed
depends on RUST-134 Drivers should use majority write con... Closed
depends on JAVA-3153 Drivers should use majority write con... Closed
depends on RUBY-1654 Implement w:majority when retrying co... Closed
is depended on by DRIVERS-586 Support sharded transactions recovery... Closed
Driver Compliance:
Key Status/Resolution FixVersion
NODE-1848 Fixed 3.1.13
SCALA-491 Done
PYTHON-1730 Fixed 3.9
CSHARP-2493 Fixed 2.9.0
RUBY-1689 Duplicate
JAVA-3153 Fixed 3.11.0
CXX-1719 Fixed 3.5.0
PHPC-1319 Fixed 1.6.0alpha3, 1.6.0
GODRIVER-790 Fixed 1.0.0
CDRIVER-2936 Fixed 1.15.0
RUST-134 Duplicate
PERL-1057 Fixed 2.2.0
MOTOR-305 Fixed 2.1
RUBY-1654 Fixed 2.8.0.rc0, 2.7.1
SWIFT-565 Done

 Description   

Relevant changes were added to the commitTransaction section:

When commitTransaction is retried, either by the driver's internal retry-once logic or explicitly by the user calling commitTransaction again, drivers MUST apply w: majority to the write concern of the commitTransaction command. If the transaction is using a writeConcern that is not the server default (i.e. specified via TransactionOptions during the startTransaction call or otherwise inherited), any other write concern options (e.g. wtimeout) MUST be left as-is when applying w: majority. Finally, if the modified write concern does not include a wtimeout value, drivers MUST also apply wtimeout: 10000 to the write concern in order to avoid waiting forever (or until a socket timeout) if the majority write concern cannot be satisfied. See Majority write concern is used when retrying commitTransaction.

Note: The transaction spec tests have also been updated. Please ensure your driver is synced to https://github.com/mongodb/specifications/commit/ba1b071fa8b63454fb421bec824c454c92fc5e83 (or newer).



 Comments   
Comment by Githook User [ 13/Feb/19 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: Replace SPEC-1185 reference with DRIVERS-601
Branch: master
https://github.com/mongodb/specifications/commit/f9f18ec0047af370d5f3aab6309171530618a076

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