Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-114

mongorestore --drop sometimes reports duplicate ID violation restoring system.js

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: Legacy C++ Implementation
    • Fix Version/s: None
    • Component/s: mongorestore
    • Labels:
      None
    • Environment:
      Windows 7 64bit

      Description

      When trying to restore a database dumped with mongodump via mongorestore:

       mongorestore --drop --host localhost --db mydb mydumpdir\mydb 

      I sometimes get:

      ERROR: Error creating index mydb.system.js: 11000 err: "E11000 duplicate key error index: mydb.system.js.$id dup key: { : "myfunction" }"

      This only happens on the second restore after a manual drop, i.e. if I manually drop the database and then restore it, it restores fine; a second restore would error out with a duplicate key error; but any subsequent invocation of the same restore command (without manual dropping) succeeds.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              gabriel.russell Gabriel Russell
              Reporter:
              avish Avishay Lavie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: