readConcern property
ReadConcern?
readConcern
final
Starting in MongoDB 3.6, the readConcern option has the following syntax: readConcern: { level:
- "local". This is the default read concern level for read operations against primary and read operations against secondaries when associated with causally consistent sessions.
- "available". This is the default for reads against secondaries when when not associated with causally consistent sessions. The query returns the instance’s most recent data.
- "majority". Available for replica sets that use WiredTiger storage engine.
- "linearizable". Available for read operations on the primary only. For more formation on the read concern levels, see Read Concern Levels.
Starting in MongoDB 4.2, the $out stage cannot be used in conjunction with read concern "linearizable". That is, if you specify "linearizable" read concern for db.collection.aggregate(), you cannot include the $out stage in the pipeline.
The $merge stage cannot be used in conjunction with read concern "linearizable". That is, if you specify "linearizable" read concern for db.collection.aggregate(), you cannot include the $merge stage in the pipeline.
Implementation
final ReadConcern? readConcern;