Welcome to the MongoDB Community @Caio_Morceli !
Eventually consistent reply as @max replied before I posted my draft ![]()
Causal consistency refers to guarantees around the order of operations observed by clients in a distributed system. Client sessions only guarantee full causal consistency with “majority” read concern and “majority” write concern, but different combinations are possible depending on your use case.
The page you referenced outlines causal guarantees (for example “Read Your Own Writes”) with different combinations of read and write concern, including example scenarios.
For some background on the original implementation of this feature in MongoDB, please see https://engineering.mongodb.com/post/ryp0ohr2w9pvv0fks88kq6qkz9k9p3. I think the introduction has some helpful context:
Traditional databases, because they service reads and writes from a single node, naturally provide sequential ordering guarantees for read and write operations known as “causal consistency”. A distributed system can provide these guarantees, but in order to do so, it must coordinate and order related events across all of its nodes, and limit how fast certain operations can complete. While causal consistency is easiest to understand when all data ordering guarantees are preserved – mimicking a vertically scaled database, even when the system encounters failures like node crashes or network partitions – there exist many legitimate consistency and durability tradeoffs that all systems need to make.
FYI causal consistency and associated guarantees are general data concepts for distributed systems (not specific to MongoDB):
Causal consistency provides guarantees around the ordering of data operations observed by clients in a distributed system, which mimics a single vertically scaled database deployment.
Eventual consistency refers to the behaviour that writes in a distributed system will converge with a consistent history (for example, via application of an idempotent replication oplog) , but are not guaranteed to be consistent if you read from different members of a cluster without appropriate read concerns.
Regards,
Stennie