-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:
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?