Skip to content

Commit 5196ecf

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

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
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

@@ -129,6 +132,18 @@ The values for the ``version`` are:
129132
Disables the :ref:`3.4 features that persist data
130133
incompatible with MongoDB 3.2 <3.4-compatibility-enabled>`.
131134

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+
132147
.. note::
133148

134149
.. 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
448463
3.4, you must also remove all persisted features that are
449464
:ref:`incompatible <3.6-compatibility-enabled>` with 3.4. See the
450465
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+
} )

source/release-notes/5.1.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ new fields are included in the query explain plan output.
115115
- The new query execution engine is used if possible.
116116

117117
- If the new query execution engine is used, new fields are included in
118-
the :ref:`query explain plan output <explain-results-5.1-later>`.ß
118+
the :ref:`query explain plan output <explain-results-5.1-later>`.
119119

120120
Set Slot-Based Query Execution Plan Cache Size
121121
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)