Skip to content

DOCS-14888 setFeatureCompatibilityVersion wtimeout #6170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions source/reference/command/setFeatureCompatibilityVersion.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ Definition

.. dbcommand:: setFeatureCompatibilityVersion

.. versionadded:: 3.4

.. versionchanged:: 3.6

Enables or disables the features that persist data incompatible with
earlier versions of MongoDB. You can only issue the
:dbcommand:`setFeatureCompatibilityVersion` against the ``admin``
Expand All @@ -28,7 +24,10 @@ Definition

.. code-block:: javascript

db.adminCommand( { setFeatureCompatibilityVersion: <version> } )
db.adminCommand( {
setFeatureCompatibilityVersion: <version>,
writeConcern: { wtimeout: <timeout> }
} )

The values for the ``version`` are:

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

The optional ``writeConcern`` specifies the write concern
:ref:`wc-wtimeout` value in milliseconds:

- The time period that the :term:`primary` waits for
acknowledgment from the majority of the replica set members. If the
acknowledgment is not received in the time period, the operation
fails.

- Default is ``60000`` milliseconds. Use a longer time period if the
:term:`secondary` members of the replica set have a delay that
exceeds the :ref:`wc-wtimeout` default.

.. note::

.. include:: /includes/list-run-command-targets.rst
Expand Down Expand Up @@ -434,3 +445,23 @@ Set Feature Compatibility Version on MongoDB 3.4 Deployments
If performed as part of a downgrade to 3.2 procedure, you must also
manually remove the existing usage before downgrading the binaries. For
details, see :ref:`3.4-downgrade-features-prereq`.

Set Write Concern Timeout
~~~~~~~~~~~~~~~~~~~~~~~~~

The following example sets the optional write concern :ref:`wc-wtimeout`
field to 5000 (5 seconds).

.. note::

Run the :dbcommand:`setFeatureCompatibilityVersion` command against
the ``admin`` database.

.. include:: /includes/list-run-command-targets.rst

.. code-block:: javascript

db.adminCommand( {
setFeatureCompatibilityVersion: "4.2",
writeConcern: { wtimeout: 5000 }
} )