@@ -27,7 +27,10 @@ The command takes the following form:
2727
2828.. code-block:: javascript
2929
30- db.adminCommand( { setFeatureCompatibilityVersion: <version> } )
30+ db.adminCommand( {
31+ setFeatureCompatibilityVersion: <version>,
32+ writeConcern: { wtimeout: <timeout> }
33+ } )
3134
3235The values for the ``version`` are:
3336
@@ -129,6 +132,18 @@ The values for the ``version`` are:
129132 Disables the :ref:`3.4 features that persist data
130133 incompatible with MongoDB 3.2 <3.4-compatibility-enabled>`.
131134
135+ The optional ``writeConcern`` specifies the write concern
136+ :ref:`wc-wtimeout` value in milliseconds:
137+
138+ - The time period that the :term:`primary` waits for
139+ acknowledgment from the majority of the replica set members. If the
140+ acknowledgment is not received in the time period, the operation
141+ fails.
142+
143+ - Default is ``60000`` milliseconds. Use a longer time period if the
144+ :term:`secondary` members of the replica set have a delay that exceeds
145+ the :ref:`wc-wtimeout` default.
146+
132147.. note::
133148
134149 .. 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
4484633.4, you must also remove all persisted features that are
449464:ref:`incompatible <3.6-compatibility-enabled>` with 3.4. See the
450465appropriate downgrade procedures.
466+
467+ Set Write Concern Timeout
468+ ~~~~~~~~~~~~~~~~~~~~~~~~~
469+
470+ The following example sets the optional write concern :ref:`wc-wtimeout`
471+ field to 5000 (5 seconds).
472+
473+ .. note::
474+
475+ Run the :dbcommand:`setFeatureCompatibilityVersion` command against
476+ the ``admin`` database.
477+
478+ .. include:: /includes/list-run-command-targets.rst
479+
480+ .. code-block:: javascript
481+
482+ db.adminCommand( {
483+ setFeatureCompatibilityVersion: "5.0",
484+ writeConcern: { wtimeout: 5000 }
485+ } )
0 commit comments