@@ -15,10 +15,6 @@ Definition
15
15
16
16
.. dbcommand:: setFeatureCompatibilityVersion
17
17
18
- .. versionadded:: 3.4
19
-
20
- .. versionchanged:: 3.6
21
-
22
18
Enables or disables the features that persist data incompatible with
23
19
earlier versions of MongoDB. You can only issue the
24
20
:dbcommand:`setFeatureCompatibilityVersion` against the ``admin``
@@ -28,7 +24,10 @@ Definition
28
24
29
25
.. code-block:: javascript
30
26
31
- db.adminCommand( { setFeatureCompatibilityVersion: <version> } )
27
+ db.adminCommand( {
28
+ setFeatureCompatibilityVersion: <version>,
29
+ writeConcern: { wtimeout: <timeout> }
30
+ } )
32
31
33
32
The values for the ``version`` are:
34
33
@@ -104,6 +103,18 @@ Definition
104
103
Disables the :ref:`3.4 features that persist data
105
104
incompatible with MongoDB 3.2 <3.4-compatibility-enabled>`.
106
105
106
+ The optional ``writeConcern`` specifies the write concern
107
+ :ref:`wc-wtimeout` value in milliseconds:
108
+
109
+ - The time period that the :term:`primary` waits for
110
+ acknowledgment from the majority of the replica set members. If the
111
+ acknowledgment is not received in the time period, the operation
112
+ fails.
113
+
114
+ - Default is ``60000`` milliseconds. Use a longer time period if the
115
+ :term:`secondary` members of the replica set have a delay that
116
+ exceeds the :ref:`wc-wtimeout` default.
117
+
107
118
.. note::
108
119
109
120
.. include:: /includes/list-run-command-targets.rst
@@ -434,3 +445,23 @@ Set Feature Compatibility Version on MongoDB 3.4 Deployments
434
445
If performed as part of a downgrade to 3.2 procedure, you must also
435
446
manually remove the existing usage before downgrading the binaries. For
436
447
details, see :ref:`3.4-downgrade-features-prereq`.
448
+
449
+ Set Write Concern Timeout
450
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
451
+
452
+ The following example sets the optional write concern :ref:`wc-wtimeout`
453
+ field to 5000 (5 seconds).
454
+
455
+ .. note::
456
+
457
+ Run the :dbcommand:`setFeatureCompatibilityVersion` command against
458
+ the ``admin`` database.
459
+
460
+ .. include:: /includes/list-run-command-targets.rst
461
+
462
+ .. code-block:: javascript
463
+
464
+ db.adminCommand( {
465
+ setFeatureCompatibilityVersion: "4.2",
466
+ writeConcern: { wtimeout: 5000 }
467
+ } )
0 commit comments