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. The getMore command uses the readConcern level specified in the originating find command.

Implementation

final ReadConcern? readConcern;