Skip to content

Commit ce477a9

Browse files
jason-price-mongodbjason-price-mongodb
andauthored
DOCS-14888 setFeatureCompatibilityVersion wtimeout (mongodb#6170)
Co-authored-by: jason-price-mongodb <[email protected]>
1 parent ca41e77 commit ce477a9

File tree

1 file changed

+36
-5
lines changed

1 file changed

+36
-5
lines changed

source/reference/command/setFeatureCompatibilityVersion.txt

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ Definition
1515

1616
.. dbcommand:: setFeatureCompatibilityVersion
1717

18-
.. versionadded:: 3.4
19-
20-
.. versionchanged:: 3.6
21-
2218
Enables or disables the features that persist data incompatible with
2319
earlier versions of MongoDB. You can only issue the
2420
:dbcommand:`setFeatureCompatibilityVersion` against the ``admin``
@@ -28,7 +24,10 @@ Definition
2824

2925
.. code-block:: javascript
3026

31-
db.adminCommand( { setFeatureCompatibilityVersion: <version> } )
27+
db.adminCommand( {
28+
setFeatureCompatibilityVersion: <version>,
29+
writeConcern: { wtimeout: <timeout> }
30+
} )
3231

3332
The values for the ``version`` are:
3433

@@ -104,6 +103,18 @@ Definition
104103
Disables the :ref:`3.4 features that persist data
105104
incompatible with MongoDB 3.2 <3.4-compatibility-enabled>`.
106105

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+
107118
.. note::
108119

109120
.. include:: /includes/list-run-command-targets.rst
@@ -434,3 +445,23 @@ Set Feature Compatibility Version on MongoDB 3.4 Deployments
434445
If performed as part of a downgrade to 3.2 procedure, you must also
435446
manually remove the existing usage before downgrading the binaries. For
436447
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

Comments
 (0)