From 28fbb67d7782a5fbe76459e9b3b422b9ef0a30cb Mon Sep 17 00:00:00 2001 From: ian fogelman Date: Thu, 28 Oct 2021 14:55:40 -0400 Subject: [PATCH] DOCS-14644-assert CWWC is set on server start | DOCS-14643 on sh.addShard --- .../fact-5.1-fassert-shard-restart-add-CWWC.rst | 12 ++++++++++++ source/reference/mongodb-defaults.txt | 2 ++ source/release-notes/5.1-compatibility.txt | 5 +++++ source/release-notes/5.1.txt | 5 +++++ source/sharding.txt | 2 ++ 5 files changed, 26 insertions(+) create mode 100644 source/includes/fact-5.1-fassert-shard-restart-add-CWWC.rst diff --git a/source/includes/fact-5.1-fassert-shard-restart-add-CWWC.rst b/source/includes/fact-5.1-fassert-shard-restart-add-CWWC.rst new file mode 100644 index 00000000000..ecc93fcf3dd --- /dev/null +++ b/source/includes/fact-5.1-fassert-shard-restart-add-CWWC.rst @@ -0,0 +1,12 @@ +Starting in MongoDB 5.1, when starting, restarting or adding a +:doc:`shard server` with :method:`sh.addShard()` the +:ref:`Cluster Wide Write Concern (CWWC) ` +must be set. + +If the ``CWWC`` is not set and the shard is configured +such that the :ref:`default 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 ` for +details on how the default write concern is calculated. diff --git a/source/reference/mongodb-defaults.txt b/source/reference/mongodb-defaults.txt index a0b7f91ac00..699a6501125 100644 --- a/source/reference/mongodb-defaults.txt +++ b/source/reference/mongodb-defaults.txt @@ -215,6 +215,8 @@ Write Concern :alt: Read/Write Concern Inheritance :figwidth: 500px +.. _default-wc-formula: + Default Write Concern ~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/release-notes/5.1-compatibility.txt b/source/release-notes/5.1-compatibility.txt index c3ce44fdd2f..bc3f368c3b5 100644 --- a/source/release-notes/5.1-compatibility.txt +++ b/source/release-notes/5.1-compatibility.txt @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/release-notes/5.1.txt b/source/release-notes/5.1.txt index b293432c72e..b9e18e1ed68 100644 --- a/source/release-notes/5.1.txt +++ b/source/release-notes/5.1.txt @@ -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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sharding.txt b/source/sharding.txt index 5d5afe70515..06f42c054fc 100644 --- a/source/sharding.txt +++ b/source/sharding.txt @@ -237,6 +237,8 @@ a :ref:`broadcast operation `, 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