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: 12 additions & 0 deletions source/includes/fact-5.1-fassert-shard-restart-add-CWWC.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Starting in MongoDB 5.1, when starting, restarting or adding a
:doc:`shard server</sharding>` with :method:`sh.addShard()` the
:ref:`Cluster Wide Write Concern (CWWC) <set_global_default_write_concern>`
must be set.

If the ``CWWC`` is not set and the shard is configured
such that the :ref:`default write concern <write-concern>` is
``{ w : 1 }`` the shard server will fail to start or be added
and returns an error.

See :ref:`default write concern calculations <default-wc-formula>` for
details on how the default write concern is calculated.
2 changes: 2 additions & 0 deletions source/reference/mongodb-defaults.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ Write Concern
:alt: Read/Write Concern Inheritance
:figwidth: 500px

.. _default-wc-formula:

Default Write Concern
~~~~~~~~~~~~~~~~~~~~~

Expand Down
5 changes: 5 additions & 0 deletions source/release-notes/5.1-compatibility.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ Shell Changes
Replica Sets
------------

Assert Cluster Wide Write Concern is Set When Starting or Adding Shard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. include:: /includes/fact-5.1-fassert-shard-restart-add-CWWC.rst

``rs.reconfig`` Cluster Wide Write Concern Validation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
5 changes: 5 additions & 0 deletions source/release-notes/5.1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ For an example, see :ref:`validation-description-example`.
Replica Sets
------------

Assert Cluster Wide Write Concern is Set When Starting or Adding Shard
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. include:: /includes/fact-5.1-fassert-shard-restart-add-CWWC.rst

``rs.reconfig`` Cluster Wide Write Concern Validation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions source/sharding.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ a :ref:`broadcast operation <sharding-mongos-broadcast>`, querying
*all* shards in the sharded cluster. These scatter/gather queries can
be long running operations.

.. include:: /includes/fact-5.1-fassert-shard-restart-add-CWWC.rst

.. note::

If you have an active support contract with MongoDB, consider contacting
Expand Down