@@ -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
@@ -119,6 +122,18 @@ The values for the ``version`` are:
119
122
Disables the :ref:`3.4 features that persist data
120
123
incompatible with MongoDB 3.2 <3.4-compatibility-enabled>`.
121
124
125
+ The optional ``writeConcern`` specifies the write concern
126
+ :ref:`wc-wtimeout` value in milliseconds:
127
+
128
+ - The time period that the :term:`primary` waits for
129
+ acknowledgment from the majority of the replica set members. If the
130
+ acknowledgment is not received in the time period, the operation
131
+ fails.
132
+
133
+ - Default is ``60000`` milliseconds. Use a longer time period if the
134
+ :term:`secondary` members of the replica set have a delay that exceeds
135
+ the :ref:`wc-wtimeout` default.
136
+
122
137
.. note::
123
138
124
139
.. include:: /includes/list-run-command-targets.rst
@@ -494,3 +509,23 @@ Set Feature Compatibility Version on MongoDB 3.4 Deployments
494
509
If performed as part of a downgrade to 3.2 procedure, you must also
495
510
manually remove the existing usage before downgrading the binaries. For
496
511
details, see :ref:`3.4-downgrade-features-prereq`.
512
+
513
+ Set Write Concern Timeout
514
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
515
+
516
+ The following example sets the optional write concern :ref:`wc-wtimeout`
517
+ field to 5000 (5 seconds).
518
+
519
+ .. note::
520
+
521
+ Run the :dbcommand:`setFeatureCompatibilityVersion` command against
522
+ the ``admin`` database.
523
+
524
+ .. include:: /includes/list-run-command-targets.rst
525
+
526
+ .. code-block:: javascript
527
+
528
+ db.adminCommand( {
529
+ setFeatureCompatibilityVersion: "4.4",
530
+ writeConcern: { wtimeout: 5000 }
531
+ } )
0 commit comments