MongoDB Safe Mode Consistency
Help me understand what level of consistency I can expect in MongoDB in this situation.
We are executing a replica set with a flag consistency
in Mongoid set to strong
, which means the read only goes to the master. But the safe
default configuration uses a value false
, so write operations return immediately.
Assuming there are no errors, if the client application inserts a new large document and then quickly tries to read it on a different thread, are we guaranteed to get the document back? Or do we need to enable the mode safe
to ensure a level of consistency?
source to share