File tree Expand file tree Collapse file tree 5 files changed +23
-47
lines changed Expand file tree Collapse file tree 5 files changed +23
-47
lines changed Original file line number Diff line number Diff line change 11Possible read concern levels are:
22
33- :readconcern: `"local" `. This is the default read concern level for
4- read operations against primary and read operations against
5- secondaries when associated with :ref: `causally consistent sessions
6- <causal-consistency>`.
4+ read operations against the primary and secondaries.
75
8- - :readconcern: `"available" `. This is the default for reads against
9- secondaries when when not associated with :ref: ` causally consistent
10- sessions <causal-consistency>`. The query returns the instance's most
11- recent data.
6+ - :readconcern: `"available" `. Available for read operations against
7+ the primary and secondaries. :readconcern: ` "available" ` behaves the
8+ same as :readconcern: ` "local" ` against the primary and non-sharded
9+ secondaries. The query returns the instance's most recent data.
1210
1311- :readconcern: `"majority" `. Available for replica sets that use
1412 :ref: `WiredTiger storage engine <storage-wiredtiger >`.
Original file line number Diff line number Diff line change @@ -49,8 +49,7 @@ follows:
4949 - This read concern :red:`does not` guarantee :ref:`causal
5050 consistency <sessions>`.
5151
52- * - | Reads against secondaries if the reads are
53- | associated with :ref:`causally consistent sessions <sessions>`.
52+ * - | Reads against secondaries.
5453
5554 - :readconcern:`"local"`
5655
@@ -63,22 +62,6 @@ follows:
6362 consistency <sessions>`.
6463
6564
66- * - | Reads against secondaries if the reads are :red:`not`
67- | associated with :ref:`causally consistent sessions <sessions>`.
68-
69- - :readconcern:`"available"`
70-
71- .. note::
72-
73- - This read concern can return data that may be rolled
74- back.
75-
76- - This read concern :red:`does not` guarantee :ref:`causal
77- consistency <sessions>`.
78-
79- - For sharded collections, this read concern can also return
80- :red:`orphaned documents`.
81-
8265.. _mongodb-default-rc-outside-transactions:
8366
8467.. _mongodb-default-rc-txns:
Original file line number Diff line number Diff line change @@ -17,12 +17,8 @@ A query with read concern ``"local"`` returns data from the instance
1717with no guarantee that the data has been written to a majority of the
1818replica set members (i.e. may be rolled back).
1919
20- Read concern ``"local"`` is the default for:
21-
22- - read operations against primary
23-
24- - read operations against secondaries if the reads are associated with
25- :ref:`causally consistent sessions <sessions>`.
20+ Read concern ``"local"`` is the default for read operations against the
21+ primary and secondaries.
2622
2723.. include:: /includes/fact-readConcern-most-recent-data-in-node.rst
2824
Original file line number Diff line number Diff line change @@ -54,19 +54,7 @@ The following read concern levels are available:
5454 the data has been written to a majority of the replica set
5555 members (i.e. may be rolled back).
5656
57- Default for:
58- - reads against primary
59-
60- - reads against secondaries if the reads are
61- associated with :ref:`causally consistent sessions <sessions>`.
62-
63- .. note::
64-
65- Causally consistent client sessions only guarantee
66- causal consistency if the associated read operations use
67- :readconcern:`"majority"` read concern and the
68- associated write operations use
69- :writeconcern:`"majority"` write concern.
57+ Default for reads against the primary and secondaries.
7058
7159 **Availability:** Read concern :readconcern:`"local"` is available
7260 for use with or without causally consistent sessions and
@@ -81,9 +69,6 @@ The following read concern levels are available:
8169 that the data has been written to a majority of the replica set
8270 members (i.e. may be rolled back).
8371
84- **Default for:** reads against secondaries if the reads are :red:`not`
85- associated with :ref:`causally consistent sessions <sessions>`.
86-
8772 **Availability:** Read concern :readconcern:`"available"` is
8873 :red:`unavailable for use` with causally consistent sessions and
8974 transactions.
Original file line number Diff line number Diff line change @@ -166,6 +166,20 @@ Read Concern ``snapshot`` on Capped Collections
166166
167167.. include:: /includes/extracts/transactions-capped-collection-read-change.rst
168168
169+
170+ ``local`` is the Default Read Concern
171+ -------------------------------------
172+
173+ Starting in MongoDB 5.0, :readconcern:`"local"` is the default read
174+ concern level for read operations against the primary and secondaries.
175+
176+ This may introduce a significant latency increase for count queries that
177+ use a filter and for :ref:`covered queries <covered-queries>`.
178+
179+ You can opt out of this behavior by setting the cluster-wide
180+ :ref:`read concern <read-concern>` with
181+ :dbcommand:`setDefaultRWConcern`.
182+
169183Update Operator Changes
170184-----------------------
171185
You can’t perform that action at this time.
0 commit comments