Skip to content
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

(DOCS-13376): Add performance warnings for validation #5798

Merged
merged 1 commit into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
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
16 changes: 16 additions & 0 deletions source/reference/command/validate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ Definition
Behavior
--------

Performance
~~~~~~~~~~~

The :dbcommand:`validate` command can be slow, particularly on
larger data sets.

Expand All @@ -80,6 +83,19 @@ until the operation finishes. When run on a secondary, the
:dbcommand:`validate` operation can block all other operations on that
secondary until it finishes.

.. warning::

Due to the performance impact of validation, consider running
:dbcommand:`validate` only on :term:`secondary` replica set nodes.
You can use :method:`rs.stepDown()` to instruct the current
:term:`primary` node to become a secondary to avoid impacting a live
primary node.

Data Throughput Metrics
~~~~~~~~~~~~~~~~~~~~~~~

.. include:: /includes/extracts/4.4-validate-data-throughput.rst

Restrictions
~~~~~~~~~~~~~

Expand Down
18 changes: 15 additions & 3 deletions source/reference/method/db.collection.validate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,29 @@ Description
Behavior
--------

Performance
~~~~~~~~~~~

The :method:`db.collection.validate()` method is potentially resource
intensive and may impact the performance of your MongoDB instance.
intensive and may impact the performance of your MongoDB instance,
particularly on larger data sets.

The :method:`db.collection.validate()` method obtains an exclusive lock
on the collection. This will block all reads and writes on the
collection until the operation finishes. When run on a secondary, the
operation can block all other operations on that secondary until it
finishes.

The :method:`db.collection.validate()` method can be slow, particularly
on larger data sets.
.. warning::

Due to the performance impact of validation, consider running
:method:`db.collection.validate()` only on :term:`secondary` replica
set nodes. You can use :method:`rs.stepDown()` to instruct the
current :term:`primary` node to become a secondary to avoid
impacting a live primary node.

Data Throughput Metrics
~~~~~~~~~~~~~~~~~~~~~~~


Examples
Expand Down