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

mongorestore `archive` option can lead to cursor being lost

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.2.7
    • mongodump, mongorestore
    • None
    • unclear, migration was between compose.io and atlas

    Description

      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).

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: