Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-30273

mongodump seems to include orphan documents when dumping from a mongos

    • Type: Icon: Bug Bug
    • Resolution: Incomplete
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.2.15
    • Component/s: Tools
    • None
    • ALL

      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?

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            niccottrell Nic Cottrell (Personal)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: