Skip to content

DOCS-14135 enableMajorityReadConcern may only be set to true in v5.0 #5553

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
2 changes: 0 additions & 2 deletions source/administration/production-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,6 @@ Read Concern

.. include:: /includes/fact-read-own-writes.rst

.. include:: /includes/fact-enable-majority-readConcern.rst

Write Concern
~~~~~~~~~~~~~

Expand Down
18 changes: 0 additions & 18 deletions source/core/replica-set-arbiter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,6 @@ number of votes to break a tie:

.. end-content-even-votes-example

Read Concern ``majority`` and Three-Member PSA
----------------------------------------------

.. warning:: For 3-Member Primary-Secondary-Arbiter Architecture*


If you have a three-member replica set with a
primary-secondary-arbiter (PSA) architecture or a sharded cluster
with a three-member PSA shards, the cache pressure will increase if
any data bearing node is down and support for
:readconcern:`"majority"` read concern is enabled.

To prevent the storage cache pressure from immobilizing a deployment
with a three-member primary-secondary-arbiter (PSA) architecture,
you can disable read concern "majority" starting in MongoDB 4.0.3
(and 3.6.1+). For more information, see
:ref:`disable-read-concern-majority`.

Replica Set Protocol Version and Arbiter
-----------------------------------------

Expand Down
31 changes: 0 additions & 31 deletions source/core/transactions-production-consideration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,37 +147,6 @@ Sharded Clusters and Arbiters

.. include:: /includes/extracts/transactions-arbiters.rst

.. |disabledrcmaj| replace:: :ref:`transactions-psa`

.. _transactions-psa:

3-Member Primary-Secondary-Arbiter Architecture
-----------------------------------------------

For a three-member replica set with a primary-secondary-arbiter (PSA)
architecture or a sharded cluster with a three-member PSA shards, you
may have :ref:`disabled read concern "majority"
<disable-read-concern-majority>` to avoid cache pressure.

.. include:: /includes/extracts/transactions-read-concern-majority-sharded-clusters.rst

.. include:: /includes/extracts/transactions-read-concern-majority-replica-set.rst

.. tip::

To check if read concern "majority" is disabled, You can run
:method:`db.serverStatus()` on the :binary:`~bin.mongod` instances
and check the :serverstatus:`storageEngine.supportsCommittedReads`
field. If ``false``, read concern "majority" is disabled.

.. seealso::

- :option:`--enableMajorityReadConcern false <mongod
--enableMajorityReadConcern>`

- :setting:`replication.enableMajorityReadConcern: false
<replication.enableMajorityReadConcern>`.

.. _txns-locks:

Acquiring Locks
Expand Down
21 changes: 0 additions & 21 deletions source/core/transactions-sharded-clusters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,27 +113,6 @@ Arbiters

.. include:: /includes/extracts/transactions-arbiters.rst

.. |disabledrcmaj| replace:: :ref:`transactions-sharded-clusters-psa`

.. _transactions-sharded-clusters-psa:

Three Member Primary-Secondary-Arbiter Shards
---------------------------------------------

For a sharded cluster with three-member PSA shards, you may have
:ref:`disabled read concern "majority" <disable-read-concern-majority>`
(i.e. :option:`--enableMajorityReadConcern false <mongod
--enableMajorityReadConcern>` or
:setting:`replication.enableMajorityReadConcern: false
<replication.enableMajorityReadConcern>`) to avoid cache pressure.

.. include:: /includes/extracts/transactions-read-concern-majority-sharded-clusters.rst

To check if read concern "majority" is disabled,
You can run :method:`db.serverStatus()` and check the
:serverstatus:`storageEngine.supportsCommittedReads` field. If
``false``, read concern "majority" is disabled.

Backups and Restores
--------------------

Expand Down
28 changes: 0 additions & 28 deletions source/core/transactions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -714,34 +714,6 @@ Arbiters

.. include:: /includes/extracts/transactions-arbiters.rst

.. |disabledrcmaj| replace:: :ref:`transactions-disabled-rc-majority`

.. _transactions-disabled-rc-majority:

Disabled Read Concern Majority
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

A 3-member PSA (Primary-Secondary-Arbiter) replica set or a sharded
cluster with 3-member PSA shards may have disabled read concern
majority (:option:`--enableMajorityReadConcern false <mongod
--enableMajorityReadConcern>` or
:setting:`replication.enableMajorityReadConcern: false
<replication.enableMajorityReadConcern>`)

.. include:: /includes/extracts/transactions-read-concern-majority-sharded-clusters.rst

.. include:: /includes/extracts/transactions-read-concern-majority-replica-set.rst

.. tip::

To check if read concern "majority" is disabled, You can run
:method:`db.serverStatus()` on the :binary:`~bin.mongod` instances
and check the :serverstatus:`storageEngine.supportsCommittedReads`
field. If ``false``, read concern "majority" is disabled.

For more information, see :ref:`transactions-psa` and
:ref:`transactions-sharded-clusters-psa`.

.. _transactions-wcmajority-disabled:

Shard Configuration Restriction
Expand Down
25 changes: 0 additions & 25 deletions source/includes/extracts-transactions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -294,29 +294,6 @@ content: |
# This is included in pages talking more about disabling rc majority and its effects.

# Separate includes (see below) for transactions pages where the transactions leads as the subject
---
ref: transactions-read-concern-majority-sharded-clusters
content: |

On sharded clusters,
- If a transaction involves a shard that has :ref:`disabled read
concern "majority" <disable-read-concern-majority>`, you cannot
use read concern :readconcern:`"snapshot"` for the transaction.
You can only use read concern :readconcern:`"local"` or
:readconcern:`"majority"` for the transaction. If you use read
concern :readconcern:`"snapshot"`, the transaction errors and
aborts.

.. code-block:: none
:copyable: false

readConcern level 'snapshot' is not supported in sharded clusters when enableMajorityReadConcern=false.

- Transactions whose write operations span multiple shards will
error and abort if any of the transaction's read or write
operations involves a shard that has disabled read concern
``"majority"``.

---
ref: transactions-read-concern-majority-replica-set
content: |
Expand Down Expand Up @@ -459,8 +436,6 @@ content: |
and abort if any transaction operation reads from or writes to a
shard that contains an arbiter.

See also |disabledrcmaj| for transaction restrictions on shards that
have disabled read concern majority.
---
ref: transactions-committed-visibility
content: |
Expand Down
11 changes: 11 additions & 0 deletions source/includes/fact-eMRC-always-true-in-5.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Starting in MongoDB 5.0,
:setting:`~replication.enableMajorityReadConcern` and
:option:`--enableMajorityReadConcern` cannot be changed
and are always set to ``true`` due to storage engine improvements.

In earlier versions of MongoDB,
:setting:`~replication.enableMajorityReadConcern` and
:option:`--enableMajorityReadConcern` are configurable and can be set
to ``false`` to prevent storage cache pressure from immobilizing a
deployment with a three-member primary-secondary-arbiter (PSA)
architecture.
8 changes: 0 additions & 8 deletions source/includes/fact-enable-majority-readConcern.rst

This file was deleted.

2 changes: 0 additions & 2 deletions source/reference/command/aggregate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,6 @@ majority of the nodes.

.. important::

- .. include:: /includes/fact-enable-majority-readConcern.rst

- .. include:: /includes/fact-aggregate-readConcern.rst

- .. include:: /includes/fact-readConcern-most-recent-data-in-node.rst
Expand Down
2 changes: 0 additions & 2 deletions source/reference/command/count.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ majority of the nodes.

.. important::

- .. include:: /includes/fact-enable-majority-readConcern.rst

- To use the ``readConcern`` level of ``"majority"``, you must specify
a nonempty ``query`` condition.

Expand Down
4 changes: 1 addition & 3 deletions source/reference/command/distinct.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,7 @@ majority of the nodes.

.. note::

- .. include:: /includes/fact-enable-majority-readConcern.rst

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

.. code-block:: javascript

Expand Down
2 changes: 0 additions & 2 deletions source/reference/command/find.txt
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,6 @@ The following operation on a replica set specifies a :term:`read
concern` of :readconcern:`"majority"` to read the most recent copy of
the data confirmed as having been written to a majority of the nodes.

.. include:: /includes/fact-enable-majority-readConcern.rst

.. code-block:: javascript

db.runCommand(
Expand Down
4 changes: 1 addition & 3 deletions source/reference/command/geoSearch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ majority of the nodes.

.. note::

- .. include:: /includes/fact-enable-majority-readConcern.rst

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

.. code-block:: javascript

Expand Down
32 changes: 6 additions & 26 deletions source/reference/configuration-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4138,32 +4138,12 @@ LDAP Parameters

*Default*: true


Starting in MongoDB 3.6, MongoDB enables support for
:readconcern:`"majority"` read concern by default.

You can disable read concern :readconcern:`"majority"` to prevent
the storage cache pressure from immobilizing a deployment with a
three-member primary-secondary-arbiter (PSA) architecture. For more
information about disabling read concern :readconcern:`"majority"`,
see :ref:`disable-read-concern-majority`.

To disable, set :setting:`replication.enableMajorityReadConcern` to false. :setting:`replication.enableMajorityReadConcern` has no effect for
MongoDB versions: 4.0.0, 4.0.1, 4.0.2, 3.6.0.

.. important::

In general, avoid disabling :readconcern:`"majority"` read concern
unless necessary. However, if you have a three-member replica set
with a primary-secondary-arbiter (PSA) architecture or a sharded
cluster with a three-member PSA shards, disable to prevent the
storage cache pressure from immobilizing the deployment.

.. include:: /includes/extracts/transactions-read-concern-majority.rst

.. include:: /includes/fact-disable-majority-rc-rollbacks.rst

.. include:: /includes/extracts/changestream-disable-rc-majority.rst
Configures support for :readconcern:`"majority"` read concern.

Starting in MongoDB 5.0,
:setting:`~replication.enableMajorityReadConcern` cannot be changed
and is always set to ``true``. In earlier versions of MongoDB,
:setting:`~replication.enableMajorityReadConcern` was configurable.


``sharding`` Options
Expand Down
5 changes: 0 additions & 5 deletions source/reference/method/cursor.readConcern.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,6 @@ Definition
Considerations
--------------

``"majority"`` Read Concern
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. include:: /includes/fact-enable-majority-readConcern.rst

Read Your Own Writes
~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 0 additions & 2 deletions source/reference/method/db.collection.aggregate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -552,8 +552,6 @@ majority of the nodes.

.. note::

- .. include:: /includes/fact-enable-majority-readConcern.rst

- .. include:: /includes/usage-read-concern-majority.rst

- .. include:: /includes/fact-aggregate-readConcern.rst
Expand Down
2 changes: 0 additions & 2 deletions source/reference/method/db.collection.count.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ Definition
- Optional. Specifies the :term:`read concern`. The default level is
:readconcern:`"local"`.

.. include:: /includes/fact-enable-majority-readConcern.rst

.. include:: /includes/usage-read-concern-majority.rst

.. include:: /includes/fact-count-readConcern.rst
Expand Down
33 changes: 6 additions & 27 deletions source/reference/program/mongod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1836,33 +1836,12 @@ Replication Options

*Default*: true


Starting in MongoDB 3.6, MongoDB enables support for
:readconcern:`"majority"` read concern by default.

You can disable read concern :readconcern:`"majority"` to prevent
the storage cache pressure from immobilizing a deployment with a
three-member primary-secondary-arbiter (PSA) architecture. For more
information about disabling read concern :readconcern:`"majority"`,
see :ref:`disable-read-concern-majority`.

To disable, set :option:`--enableMajorityReadConcern` to false. :option:`--enableMajorityReadConcern` has no effect for
MongoDB versions: 4.0.0, 4.0.1, 4.0.2, 3.6.0.

.. important::

In general, avoid disabling :readconcern:`"majority"` read concern
unless necessary. However, if you have a three-member replica set
with a primary-secondary-arbiter (PSA) architecture or a sharded
cluster with a three-member PSA shards, disable to prevent the
storage cache pressure from immobilizing the deployment.

.. include:: /includes/extracts/transactions-read-concern-majority.rst

.. include:: /includes/fact-disable-majority-rc-rollbacks.rst

.. include:: /includes/extracts/changestream-disable-rc-majority.rst

Configures support for :readconcern:`"majority"` read concern.

Starting in MongoDB 5.0,
:option:`--enableMajorityReadConcern` cannot be changed
and is always set to ``true``. In earlier versions of MongoDB,
:option:`--enableMajorityReadConcern` was configurable.

Sharded Cluster Options
~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
Loading