Navigation

Read Concern "snapshot"

New in version 4.0.

Read concern "snapshot" is only available for multi-document transactions.

  • If the transaction is not part of a causally consistent session, upon transaction commit with write concern "majority", the transaction operations are guaranteed to have read from a snapshot of majority-committed data.
  • If the transaction is part of a causally consistent session, upon transaction commit with write concern "majority", the transaction operations are guaranteed to have read from a snapshot of majority-committed data that provides causal consistency with the operation immediately preceding the transaction start.

Read Concern and Transactions

Multi-document transactions support read concern "snapshot" as well as "local", and "majority".

Note

You set the read concern at the transaction level, not at the individual operation level. To set the read concern for transactions, see Transaction Options (Read Concern/Write Concern/Read Preference).

For a list of all operations that accept read concerns, see readConcern Support.

Causally Consistent Sessions

snapshot is available for transactions that are part of a causally consistent session.