Could someone explain to me some part of Mongodb linearizable read concern documentation:
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?
For example let's answer on 4 questions:
I have collection
testwithout 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 means that there no reason to use linearizable read concern in reads by fields which not presented in unique index?
I have collection
testwith 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?
I have collection
testwith 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?
I have collection
testwithout 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?