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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: Legacy C++ Implementation
    • Component/s: mongorestore
    • None
    • Environment:
      Windows 7 64bit
    • Platforms 2017-01-23, Platforms 2017-02-13

      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.

              Assignee:
              Gabriel Russell (Inactive)
              Reporter:
              Avishay Lavie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: