Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include sharding key if it is available in the document #102

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

pitagoras3
Copy link
Collaborator

What?

If destination collection is sharded, and Mongo Change Event has sharding key value, then place it in the documentKey used for upsert operation.

Why?

Because without this we're getting error:

Failed to update document's shard key field. There is either an orphan for this document or _id for this collection is not globally unique. :: caused by :: During insert stage of updating a shard key :: caused by :: E11000 duplicate key error collection

@pitagoras3 pitagoras3 merged commit 0a7ce3b into main Oct 23, 2024
5 checks passed
@pitagoras3 pitagoras3 deleted the fix-sharding-synchronization branch October 23, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant