Navigation

Default MongoDB Read Concerns/Write Concerns

Read/Write Concern Inheritance

The default read concern is as follows:

Operations
Default Read Concern
Reads against primary

"local"

Note
  • This read concern can return data that may be rolled back.
  • This read concern does not guarantee causal consistency.
Reads against secondaries if the reads are

"local"

Note
  • This read concern can return data that may be rolled back.
  • This read concern does not guarantee causal consistency.
Reads against secondaries if the reads are not

"available"

Note
  • This read concern can return data that may be rolled back.
  • This read concern does not guarantee causal consistency.
  • For sharded collections, this read concern can also return orphaned documents.

For more information on the available read concerns, see Read Concern.

Read/Write Concern Inheritance

The default write concern is w: 1.

Note
  • With the default write concern, data can be rolled back.
  • This write concern does not guarantee causal consistency.

For more information on the available write concerns, see Write Concern.

With causally consistent client sessions, the client sessions only guarantee causal consistency if:

  • the associated read operations use "majority" read concern, and
  • the associated write operations use "majority" write concern.
Give Feedback

On this page

  • Read Concern
  • Write Concern
  • Causally Consistency Guarantees