[SERVER-30273] mongodump seems to include orphan documents when dumping from a mongos Created: 22/Jul/17  Updated: 25/Nov/18  Resolved: 25/Oct/18

Status: Closed
Project: Core Server
Component/s: Tools
Affects Version/s: 3.2.15
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Nic Cottrell (Personal) Assignee: Kelsey Schubert
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Operating System: ALL
Participants:

 Description   

I have a 3-shard RS setup and recently ran mongodump. I'm testing a restore in a new environment and mongorestore is throwing many

code
error: E11000 duplicate key error collection: jerome5.Example index: id dup key: { : ObjectId('4e649ee8e4b0a4d912587d16') }
code

on the sharded collections. I know some of these have orphans (documents that appear on 2 shards) because I know my counts are off sometimes. Looks like mongodump is just merging the dumps of the 2 shards without resolving dupes or ignoring the orphans. Would --repair fix this? Maybe a warning in https://docs.mongodb.com/manual/reference/program/mongodump/ would be good?



 Comments   
Comment by Kelsey Schubert [ 28/Aug/17 ]

Hi niccottrell,

We haven’t heard back from you for some time, so I’m going to mark this ticket as resolved. If this is still an issue for you, please address my question so we can continue to investigate.

Regards,
Thomas

Comment by Kelsey Schubert [ 08/Aug/17 ]

Hi niccottrell,

Sorry for the delay getting back to you. My understanding is that you're running mongodump directing against the replicaset (e.g. a mongod) rather than through the mongos, is that correct?

Thanks,
Thomas

Generated at Thu Feb 08 04:23:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.