File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,20 @@ These logs do not indicate that ``mongosync`` is failing or corrupting
140
140
data. If a fatal error occurs, ``mongosync`` stops the sync and writes a
141
141
fatal log entry.
142
142
143
+ What if I see a lot of duplicate key errors in the logs?
144
+ --------------------------------------------------------
145
+
146
+ Duplicate key errors are a normal part of the sync process. These errors can
147
+ occur if:
148
+
149
+ - You insert a document on the source cluster after ``mongosync`` starts.
150
+ ``mongosync`` may directly copy the document and redundantly apply the insert
151
+ change event for the document later.
152
+ - You stop and resume ``mongosync``. This can lead to duplicate insertions when
153
+ ``mongosync`` restarts.
154
+ - ``mongosync`` encounters a transient error and reattempts an insertion that
155
+ may have already succeeded.
156
+
143
157
What should I do if mongosync returns a fatal error?
144
158
----------------------------------------------------
145
159
You can’t perform that action at this time.
0 commit comments