[DOCS-11226] MongoDB linearizable read concern restrictions Created: 18/Jan/18  Updated: 30/Oct/23

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Major - P3
Reporter: Dmitry Zyrianov Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: readconcern
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

https://docs.mongodb.com/manual/reference/read-concern/#readconcern._dq_linearizable_dq_


Issue Links:
Duplicate
Participants:
Days since reply: 1 year, 14 weeks, 2 days ago
Epic Link: DOCSP-1769

 Description   

Could you add some details about Mongodb linearizable read concern documentation. It's not clear about:

Linearizable read concern guarantees only apply if read operations specify a query filter that uniquely identifies a single document.

Does it mean that i have to have unique index on fields that presented in query filter?

Could you add better description or add some examples about this sentence, e.g.:

1. I have collection test without unique index on A field.

db.test.find({A:1}).readConcern("linearizable").maxTimeMS(10000)

Is it linearizable and i can't get stale read? If answer yes, is it mean that there no reason to use linearizable read concern in reads by fileds which not presented in unique index?

2. I have collection test with unique index on A field.

db.test.ensureIndex({A:1}, {unique:true});
db.test.find({A:1}).readConcern("linearizable").maxTimeMS(10000);

Is it linearizable and i can't get stale read?

3. I have collection test with unique index on A field.

db.test.ensureIndex({A:1}, {unique:true});
db.test.find({A:1, B:1}).readConcern("linearizable").maxTimeMS(10000);

Is it linearizable and i can't get stale read?

4. I have collection test without unique index on A field. But find method return only one document in result.

db.test.find({A:1}).readConcern("linearizable").maxTimeMS(10000); //returned {_id:"someId", A:1}

Is it linearizable and i can't get stale read?



 Comments   
Comment by Education Bot [ 31/Oct/22 ]

Hello! This ticket has been closed due to inactivity. If you believe this ticket is still important, please reopen it and leave a comment to explain why. Thank you!

Comment by Anthony Sansone (Inactive) [ 19/Jan/18 ]

allison.moore: Assigning to you because you probably have the necessary knowledge.

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