Skip to content

Commit 562be83

Browse files
authored
DOCSP-37071 Duplicate Key Error FAQ (#389) (#400)
* DOCSP-37071 Duplicate Key Error FAQ * JD feedback
1 parent baa9941 commit 562be83

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

source/faq.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,28 @@ 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+
157+
What should I do if mongosync returns a fatal error?
158+
----------------------------------------------------
159+
160+
A fatal error indicates a problem that must be corrected and requires the
161+
migration to be restarted. After addressing the error, delete all migrated
162+
data on the destination cluster, including the ``mongosync_reserved_for_internal_use``
163+
database. Then, relaunch ``mongosync`` and start a new migration.
164+
143165
Does ``mongosync`` Support TTL Indexes?
144166
----------------------------------------
145167

0 commit comments

Comments
 (0)