[CDRIVER-2841] First read in transaction uses client/db/collection readConcern, not mongoc_txn_opt_t readConcern Created: 03/Oct/18  Updated: 28/Oct/23  Resolved: 10/Oct/18

Status: Closed
Project: C Driver
Component/s: libmongoc
Affects Version/s: 1.11.0
Fix Version/s: 1.14.0

Type: Bug Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Tested
tested by CDRIVER-2773 Test only the initial command in a tr... Closed

 Description   

Transactions Spec:

Drivers MUST override all other collection, database, or client readConcerns with the transaction’s readConcern. Drivers MUST add this readConcern to the first command in a transaction if and only if the readConcern is supplied and not the default.

However, if you set a readConcern on a collection and do an aggregate or count as the first operation of a transaction, the driver sends the collection's readConcern, not the transaction's readConcern. Instead, the readConcern that was configured with mongoc_session_opts_set_default_transaction_opts or mongoc_client_session_start_transaction, or no readConcern, should be used.



 Comments   
Comment by Githook User [ 10/Oct/18 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: CDRIVER-2841 txn reads mustn't inherit readConcern
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/02f4bd911f0b6ee2c2522803efcb129d13040b04

Generated at Wed Feb 07 21:16:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.