@@ -44,14 +44,36 @@ To use the ``reverse`` endpoint:
44
44
You cannot update these options after the sync starts.
45
45
- ``mongosync`` must be in the ``COMMITTED`` state.
46
46
- 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` .
52
52
- .. include:: /includes/fact-reverse-limitation.rst
53
53
- .. include:: /includes/fact-permissions-body.rst
54
54
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
+
55
77
Request
56
78
-------
57
79
@@ -99,3 +121,4 @@ entire sync process to copy the original data.
99
121
To view the mapping direction for the synchronization of the source and
100
122
destination clusters, use the :ref:`progress <c2c-api-progress>`
101
123
endpoint and check the ``directionMapping`` object.
124
+
0 commit comments