Skip to content

Commit da7d133

Browse files
jason-price-mongodbjason-price-mongodb
andcommitted
DOCS-14888 setFeatureCompatibilityVersion wtimeout (mongodb#6167)
Co-authored-by: jason-price-mongodb <jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com>
1 parent 3314861 commit da7d133

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

source/reference/command/setFeatureCompatibilityVersion.txt

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

3235
The values for the ``version`` are:
3336

@@ -119,6 +122,18 @@ The values for the ``version`` are:
119122
Disables the :ref:`3.4 features that persist data
120123
incompatible with MongoDB 3.2 <3.4-compatibility-enabled>`.
121124

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+
122137
.. note::
123138

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

Comments
 (0)