@@ -27,7 +27,10 @@ The command takes the following form:
27
27
28
28
.. code-block:: javascript
29
29
30
- db.adminCommand( { setFeatureCompatibilityVersion: <version> } )
30
+ db.adminCommand( {
31
+ setFeatureCompatibilityVersion: <version>,
32
+ writeConcern: { wtimeout: <timeout> }
33
+ } )
31
34
32
35
The values for the ``version`` are:
33
36
@@ -129,6 +132,18 @@ The values for the ``version`` are:
129
132
Disables the :ref:`3.4 features that persist data
130
133
incompatible with MongoDB 3.2 <3.4-compatibility-enabled>`.
131
134
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
+
132
147
.. note::
133
148
134
149
.. 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
448
463
3.4, you must also remove all persisted features that are
449
464
:ref:`incompatible <3.6-compatibility-enabled>` with 3.4. See the
450
465
appropriate 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