From 81eeedb575e6a79a97a77a2257b5777eedfc0a09 Mon Sep 17 00:00:00 2001 From: jason-price-mongodb <69260375+jason-price-mongodb@users.noreply.github.com> Date: Wed, 17 Nov 2021 09:28:14 -0800 Subject: [PATCH] DOCS-14888 setFeatureCompatibilityVersion wtimeout (#6167) Co-authored-by: jason-price-mongodb --- .../setFeatureCompatibilityVersion.txt | 37 ++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/source/reference/command/setFeatureCompatibilityVersion.txt b/source/reference/command/setFeatureCompatibilityVersion.txt index 8587bd7b04b..1916ee48fd8 100644 --- a/source/reference/command/setFeatureCompatibilityVersion.txt +++ b/source/reference/command/setFeatureCompatibilityVersion.txt @@ -27,7 +27,10 @@ The command takes the following form: .. code-block:: javascript - db.adminCommand( { setFeatureCompatibilityVersion: } ) + db.adminCommand( { + setFeatureCompatibilityVersion: , + writeConcern: { wtimeout: } + } ) The values for the ``version`` are: @@ -129,6 +132,18 @@ The values for the ``version`` are: 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 @@ -448,3 +463,23 @@ If run as part of the downgrade process from MongoDB 3.6 to MongoDB 3.4, you must also remove all persisted features that are :ref:`incompatible <3.6-compatibility-enabled>` with 3.4. See the appropriate downgrade procedures. + +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: "5.0", + writeConcern: { wtimeout: 5000 } + } )