Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions source/includes/fact-readConcern-option-description.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
Possible read concern levels are:

- :readconcern:`"local"`. This is the default read concern level for
read operations against primary and read operations against
secondaries when associated with :ref:`causally consistent sessions
<causal-consistency>`.
read operations against the primary and secondaries.

- :readconcern:`"available"`. This is the default for reads against
secondaries when when not associated with :ref:`causally consistent
sessions <causal-consistency>`. The query returns the instance's most
recent data.
- :readconcern:`"available"`. Available for read operations against
the primary and secondaries. :readconcern:`"available"` behaves the
same as :readconcern:`"local"` against the primary and non-sharded
secondaries. The query returns the instance's most recent data.

- :readconcern:`"majority"`. Available for replica sets that use
:ref:`WiredTiger storage engine <storage-wiredtiger>`.
Expand Down
19 changes: 1 addition & 18 deletions source/reference/mongodb-defaults.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ follows:
- This read concern :red:`does not` guarantee :ref:`causal
consistency <sessions>`.

* - | Reads against secondaries if the reads are
| associated with :ref:`causally consistent sessions <sessions>`.
* - | Reads against secondaries.

- :readconcern:`"local"`

Expand All @@ -63,22 +62,6 @@ follows:
consistency <sessions>`.


* - | Reads against secondaries if the reads are :red:`not`
| associated with :ref:`causally consistent sessions <sessions>`.

- :readconcern:`"available"`

.. note::

- This read concern can return data that may be rolled
back.

- This read concern :red:`does not` guarantee :ref:`causal
consistency <sessions>`.

- For sharded collections, this read concern can also return
:red:`orphaned documents`.

.. _mongodb-default-rc-outside-transactions:

.. _mongodb-default-rc-txns:
Expand Down
8 changes: 2 additions & 6 deletions source/reference/read-concern-local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ A query with read concern ``"local"`` returns data from the instance
with no guarantee that the data has been written to a majority of the
replica set members (i.e. may be rolled back).

Read concern ``"local"`` is the default for:

- read operations against primary

- read operations against secondaries if the reads are associated with
:ref:`causally consistent sessions <sessions>`.
Read concern ``"local"`` is the default for read operations against the
primary and secondaries.

.. include:: /includes/fact-readConcern-most-recent-data-in-node.rst

Expand Down
17 changes: 1 addition & 16 deletions source/reference/read-concern.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,7 @@ The following read concern levels are available:
the data has been written to a majority of the replica set
members (i.e. may be rolled back).

Default for:
- reads against primary

- reads against secondaries if the reads are
associated with :ref:`causally consistent sessions <sessions>`.

.. note::

Causally consistent client sessions only guarantee
causal consistency if the associated read operations use
:readconcern:`"majority"` read concern and the
associated write operations use
:writeconcern:`"majority"` write concern.
Default for reads against the primary and secondaries.

**Availability:** Read concern :readconcern:`"local"` is available
for use with or without causally consistent sessions and
Expand All @@ -81,9 +69,6 @@ The following read concern levels are available:
that the data has been written to a majority of the replica set
members (i.e. may be rolled back).

**Default for:** reads against secondaries if the reads are :red:`not`
associated with :ref:`causally consistent sessions <sessions>`.

**Availability:** Read concern :readconcern:`"available"` is
:red:`unavailable for use` with causally consistent sessions and
transactions.
Expand Down
14 changes: 14 additions & 0 deletions source/release-notes/5.0-compatibility.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,20 @@ Read Concern ``snapshot`` on Capped Collections

.. include:: /includes/extracts/transactions-capped-collection-read-change.rst


``local`` is the Default Read Concern
-------------------------------------

Starting in MongoDB 5.0, :readconcern:`"local"` is the default read
concern level for read operations against the primary and secondaries.

This may introduce a significant latency increase for count queries that
use a filter and for :ref:`covered queries <covered-queries>`.

You can opt out of this behavior by setting the cluster-wide
:ref:`read concern <read-concern>` with
:dbcommand:`setDefaultRWConcern`.

Update Operator Changes
-----------------------

Expand Down