Skip to content

Commit c9015cc

Browse files
authored
DOCSP-32087 reverse req (#145)
* DOCSP-32087 Update reverse requirements * adds link and example * Fixes description * Fixes per Jeff * Fixes per Jeff * Fixes per Jeff * Fixes per Jeff * Fixes per Jeff * Fixes per Rohan * Fixes per Rohan * Fixes per Rohan
1 parent 4917d3a commit c9015cc

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

source/reference/api/reverse.txt

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,36 @@ To use the ``reverse`` endpoint:
4444
You cannot update these options after the sync starts.
4545
- ``mongosync`` must be in the ``COMMITTED`` state.
4646
- Source and destination clusters must be MongoDB 6.0 or later.
47-
- :ref:`Unique indexes <index-type-unique>` on the original source
48-
cluster must be formatted properly. If an upgraded cluster has unique
49-
indexes that were created in MongoDB 4.2 or earlier, you must
50-
:ref:`resync <resync-replica-member>` all of the nodes in the
51-
original source cluster before reversing.
47+
- :ref:`index-type-unique` require proper formatting. Collections with indexes
48+
initially created on MongoDB 4.2 may not have the proper formatting.
49+
50+
To validate that collection indexes use the proper formatting, see
51+
:ref:`c2c-validate-unique-index`.
5252
- .. include:: /includes/fact-reverse-limitation.rst
5353
- .. include:: /includes/fact-permissions-body.rst
5454

55+
.. _c2c-validate-unique-index:
56+
57+
Validate Unique Indexes
58+
~~~~~~~~~~~~~~~~~~~~~~~
59+
60+
In order to reverse direction, ``mongosync`` requires that all
61+
:ref:`unique <index-type-unique>` indexes use the correct formatting.
62+
Clusters that began with MongoDB 4.2 or older and were since
63+
upgraded may include unique indexes that are not properly formatted.
64+
65+
To correct indexes, you can :ref:`resync <resync-replica-member>` all nodes
66+
in the original source cluster. If you don't want to resync the cluster, you
67+
can use the :method:`db.collection.validate` method on each collection to
68+
determine whether it contains improperly formatted unique indexes.
69+
70+
.. code-block:: javascript
71+
72+
db.<collection>.validate()
73+
74+
If the method returns a warning about the unique index, you must
75+
resync all of the nodes in the original source cluster before reversing sync.
76+
5577
Request
5678
-------
5779

@@ -99,3 +121,4 @@ entire sync process to copy the original data.
99121
To view the mapping direction for the synchronization of the source and
100122
destination clusters, use the :ref:`progress <c2c-api-progress>`
101123
endpoint and check the ``directionMapping`` object.
124+

0 commit comments

Comments
 (0)