Default MongoDB Read Concerns/Write Concerns
Read Concern
Default Read Concern
The default read concern is as follows:
Operations | Default Read Concern |
---|---|
Reads against primary | Note
|
Reads against secondaries if the reads are associated with causally consistent sessions. | Note
|
Reads against secondaries if the reads are not associated with causally consistent sessions. | Note
|
Specify Read Concern: MongoDB Drivers
Additional Information
For more information on the available read concerns, see Read Concern.
Write Concern
Default Write Concern
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.
Specify Write Concern: MongoDB Drivers
Additional Information
For more information on the available write concerns, see Write Concern.
Causally Consistency Guarantees
With causally consistent client sessions, the client sessions only guarantee causal consistency if:
the associated read operations use
"majority"
read concern, andthe associated write operations use
"majority"
write concern.