[DRIVERS-254] Add support for the readConcern option. Created: 07/Aug/15  Updated: 15/Apr/19  Resolved: 21/Jun/16

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

Type: New Feature Priority: Major - P3
Reporter: Barrie Segal Assignee: Craig Wilson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CDRIVER-837 Add support for the readConcern option Closed
depends on CSHARP-1438 Support ReadConcern Closed
depends on CXX-694 Support "read committed" isolation le... Closed
depends on CXX-695 Support "read committed" isolation le... Closed
depends on JAVA-2002 Support ReadConcern Closed
depends on NODE-541 Support "read committed" isolation le... Closed
depends on PHPC-448 Add support for the readConcern option Closed
depends on PHPLIB-130 Add support for the readConcern option Closed
depends on PYTHON-981 Support readConcern option Closed
depends on RUBY-1038 Support ReadConcern Closed
depends on RUST-12 Add integration tests for readConcern... Closed
is depended on by SERVER-20214 Stop supporting majority read concern... Closed
Related
related to SERVER-18022 Support "read committed" isolation le... Closed
related to DOCS-10647 Document readConcern option for inlin... Closed
Driver Compliance:
Key Status/Resolution FixVersion
PYTHON-981 Done 3.2
PERL-564 Done 1.2.0
NODE-541 Done 2.0.43
CDRIVER-837 Done 1.3.0-beta0
RUBY-1038 Done 2.2.0
CSHARP-1438 Done 2.2
JAVA-2002 Done 3.2.0
CXX-695 Done 3.0.0-rc0
PHPLIB-130 Done 1.0.0-beta2
CXX-694 Won't Fix
SCALA-214 Done 1.1.0
PHPC-448 Done 1.1.0
RUST-12 Duplicate

 Description   

The Read Concern specification details the specifics of implementing read concern in your driver. You'll find that it is very similar to write concern.


How it looks like for commands:

db.runCommand({
    find: ....,
    readConcern : {
        level: “[majority|local]”
    }
});

Note: readConcern is only supported for the new find command helper, not legacy OP_QUERY queries.


New URI option:

mongodb://server:27017/db?readConcernLevel=[majority|local]


The commands that accept read concern are listed below:

  • find
  • aggregate without $out
  • mapReduce when the result is inline
  • distinct
  • count
  • parallelCollectionScan
  • geoNear
  • geoSearch
You only need to add support for these commands to your helper methods. Users using the runCommand method on your database object will need to supply a readConcern manually.


 Comments   
Comment by Andrew Morrow (Inactive) [ 04/Nov/15 ]

Validating for legacy C+, note that the legacy C+ driver is not implementing this feature.

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