From 2a5531a1fc284149ffc283590629734f36ca4909 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb Date: Wed, 17 Nov 2021 09:59:27 -0800 Subject: [PATCH] DOCS-14888 setFeatureCompatibilityVersion wtimeout --- .../setFeatureCompatibilityVersion.txt | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/source/reference/command/setFeatureCompatibilityVersion.txt b/source/reference/command/setFeatureCompatibilityVersion.txt index eaeada52e28..9ce6842145b 100644 --- a/source/reference/command/setFeatureCompatibilityVersion.txt +++ b/source/reference/command/setFeatureCompatibilityVersion.txt @@ -15,10 +15,6 @@ Definition .. dbcommand:: setFeatureCompatibilityVersion - .. versionadded:: 3.4 - - .. versionchanged:: 3.6 - Enables or disables the features that persist data incompatible with earlier versions of MongoDB. You can only issue the :dbcommand:`setFeatureCompatibilityVersion` against the ``admin`` @@ -28,7 +24,10 @@ Definition .. code-block:: javascript - db.adminCommand( { setFeatureCompatibilityVersion: } ) + db.adminCommand( { + setFeatureCompatibilityVersion: , + writeConcern: { wtimeout: } + } ) The values for the ``version`` are: @@ -104,6 +103,18 @@ Definition Disables the :ref:`3.4 features that persist data incompatible with MongoDB 3.2 <3.4-compatibility-enabled>`. + The optional ``writeConcern`` specifies the write concern + :ref:`wc-wtimeout` value in milliseconds: + + - The time period that the :term:`primary` waits for + acknowledgment from the majority of the replica set members. If the + acknowledgment is not received in the time period, the operation + fails. + + - Default is ``60000`` milliseconds. Use a longer time period if the + :term:`secondary` members of the replica set have a delay that + exceeds the :ref:`wc-wtimeout` default. + .. note:: .. include:: /includes/list-run-command-targets.rst @@ -434,3 +445,23 @@ Set Feature Compatibility Version on MongoDB 3.4 Deployments If performed as part of a downgrade to 3.2 procedure, you must also manually remove the existing usage before downgrading the binaries. For details, see :ref:`3.4-downgrade-features-prereq`. + +Set Write Concern Timeout +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following example sets the optional write concern :ref:`wc-wtimeout` +field to 5000 (5 seconds). + +.. note:: + + Run the :dbcommand:`setFeatureCompatibilityVersion` command against + the ``admin`` database. + + .. include:: /includes/list-run-command-targets.rst + +.. code-block:: javascript + + db.adminCommand( { + setFeatureCompatibilityVersion: "4.2", + writeConcern: { wtimeout: 5000 } + } )