[DRIVERS-591] Transaction test runner should use "local" read concern when asserting the final collection state Created: 04/Dec/18  Updated: 28/Oct/23  Resolved: 02/Apr/20

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

Type: Bug Priority: Major - P3
Reporter: Shane Harvey 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 PYTHON-1691 Test failure test_transactions_transa... Closed
depends on CDRIVER-2901 Transaction test runner should use "l... Closed
depends on CSHARP-2452 Transaction test runner should use "l... Closed
depends on GODRIVER-690 Transaction test runner should use "l... Closed
depends on JAVA-3121 Transaction test runner should use "l... Closed
depends on MOTOR-294 Transaction test runner should use "l... Closed
depends on NODE-1793 Transaction test runner should use "l... Closed
depends on RUBY-1614 Transaction test runner should use "l... Closed
depends on RUST-95 Transaction test runner should use "l... Closed
depends on CXX-1704 Transaction test runner should use "l... Closed
depends on PHPLIB-403 Transaction test runner should use "l... Closed
Driver Compliance:
Key Status/Resolution FixVersion
PYTHON-1691 Fixed 3.8
NODE-1793 Fixed 3.2.0
SCALA-483 Done
CSHARP-2452 Fixed 2.9.0
PERL-1048 Done 2.1.1
RUBY-1614 Fixed 2.9.0.rc0
JAVA-3121 Works as Designed
CXX-1704 Fixed 3.6.0-rc0, 3.6.0
PHPLIB-403 Done
MOTOR-294 Gone away
GODRIVER-690 Fixed 1.1.0
CDRIVER-2901 Fixed 1.15.0
RUST-95 Won't Fix
SWIFT-568 Done

 Description   
Useful Info

Lead:
POCs:

Summary:
The transaction spec test runner says:

#. For each element in ``outcome``:
 
   - If ``name`` is "collection", verify that the test collection contains
     exactly the documents in the ``data`` array. Ensure this find uses
     Primary read preference even when the MongoClient is configured with
     another read preference.

However, when a test configures the client with readConcern=majority and performs a write with w=1, then the subsequent find will run with readConcern=majority and possibly miss the w=1 write depending on the current majority commit point.

To ensure the find remains causally consistent with previous operations we must use "local" read concern while reading the latest data on the primary.

Final Specification:
https://github.com/mongodb/specifications/commit/0b8c2e9cef44848a89ec9b5aceeb3f5382879d46


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