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

mongorestore `archive` option can lead to cursor being lost

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.2.7
    • Component/s: mongodump, mongorestore
    • None
    • Environment:
      unclear, migration was between compose.io and atlas

      When piping output of mongodump into mongorestore using `--archive` I lost the cursor after performing a very (~26 minutes) expensive index rebuild on the previous collection.

      with "Failed: error reading collection: invalid cursor"

      ```
      mongodump [user/password/host stuff] --archive | mongorestore [user/password/host stuff] --numInsertionWorkersPerCollection 10 --batchSize 10 --stopOnError --authenticationDatabase admin --archive
      ```

      1) emails & feeditems collections are being restored in parallel
      2) document insertion on feeditems finishes
      3) instance locks to restore feeditems index (email document restoration is mid completion)
      4) index on feeditems completes, email cursor has gone

      Worked around by using the noIndexRestore, but very frustrating user experience. (Failure after 2 hours of restoration).

            Assignee:
            gabriel.russell@mongodb.com Gabriel Russell (Inactive)
            Reporter:
            henry@live.xyz henry clifford
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: