Skip to content

Commit 3b4529c

Browse files
authored
DOCSP-37071 Duplicate Key Error FAQ (#389) (#399)
* DOCSP-37071 Duplicate Key Error FAQ * JD feedback
1 parent e571788 commit 3b4529c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/faq.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,20 @@ These logs do not indicate that ``mongosync`` is failing or corrupting
140140
data. If a fatal error occurs, ``mongosync`` stops the sync and writes a
141141
fatal log entry.
142142

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+
143157
What should I do if mongosync returns a fatal error?
144158
----------------------------------------------------
145159

0 commit comments

Comments
 (0)