Skip to content

Commit 5317892

Browse files
committed
DOCS-14170 Add foreground validation reference for 5.0 standalone mulikey index considerations
1 parent 1526a05 commit 5317892

File tree

5 files changed

+29
-0
lines changed

5 files changed

+29
-0
lines changed

source/core/index-multikey.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ For more information, see :ref:`unique-separate-documents`.
7373
Limitations
7474
-----------
7575

76+
.. _compound_multikey_indexes:
77+
7678
Compound Multikey Indexes
7779
~~~~~~~~~~~~~~~~~~~~~~~~~
7880

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Index inconsistencies include:
2+
3+
- An index is :doc:`multikey </core/index-multikey>` but there are
4+
no multikey fields.
5+
- An index has :ref:`multikeyPaths <compound_multikey_indexes>` covering
6+
fields that are not multikey.
7+
- An index does not have
8+
:ref:`multikeyPaths <compound_multikey_indexes>` but
9+
there are multikey documents (for indexes built before 3.4).
10+
11+
If any inconsistencies are detected by the
12+
:method:`db.collection.validate()` command, a warning is returned
13+
and the repair flag on the index is set to ``true``.

source/reference/command/validate.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Definition
2121
Starting in version 5.0, the :dbcommand:`validate` command can also
2222
find inconsistencies in the collection and fix them if possible.
2323

24+
.. include:: /includes/fact-validate-standalone-inconsistencies.rst
25+
2426
.. note::
2527

2628
The :dbcommand:`validate` command does not support :doc:`views

source/reference/method/db.collection.validate.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ db.collection.validate()
1010
:depth: 1
1111
:class: singlecol
1212

13+
.. _validate-standalone-inconsistencies:
14+
1315
Description
1416
-----------
1517

@@ -24,6 +26,8 @@ Description
2426
Starting in version 5.0, the :method:`db.collection.validate()`
2527
method can also fix inconsistencies in the collection.
2628

29+
.. include:: /includes/fact-validate-standalone-inconsistencies.rst
30+
2731
The :method:`db.collection.validate()` method is a wrapper around
2832
the :dbcommand:`validate` command.
2933

source/release-notes/5.0.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,14 @@ Cannot Drop ``Ready`` Indexes During In-Progress Index Builds
276276

277277
.. include:: /includes/fact-5.0-dropindexes-inprog.rst
278278

279+
Foreground Validation May Fix Multikey Metadata Inconsistencies
280+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
281+
282+
When run on a MongoDB deployment,
283+
:method:`db.collection.validate()` attempts to fix
284+
:ref:`multikey metadata inconsistencies <validate-standalone-inconsistencies>`
285+
of standalone deployments.
286+
279287
Removal of ``geoHaystack`` Index and the ``geoSearch`` Command
280288
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
281289

0 commit comments

Comments
 (0)