I am confused about how causal consistency affects the decision of choosing between read-concern "local" vs "available".
Why read-concern "available" is default for secondaries when it is a non causally consistent session ?
I understand how "available" behaves for sharded clusters vs "local" behaves for unsharded collections.
I just cannot make the connection based on reading the documents.
I would really appreciate if someone helped me bridge. Thanks ahead.
Here's a summary of read concern levels in terms of a sharded cluster:
Shard secondaries default to "available" read concern to maintain behaviour compatibility with MongoDB 3.4 (see SERVER-31032)
Causal consistency can provide different guarantees depending on the read & write concern used (see Causal Consistency and Read and Write Concerns for an exhaustive detail), where a balance between read own writes, monotonic reads, monotonic writes, and writes follow reads can be achieved by using different levels of read & write concerns.
Since causal consistency provides a semblance of guarantee of data integrity, it is not compatible with "available" read concern, since "available" is meant to provide no guarantee regarding integrity, but to emphasize availability instead.