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

mongorestore should retry insert commands in the face of network errors

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Gone away
    • None
    • None
    • mongorestore

    Description

      mongorestore accepts a replica set connection string for its --host argument. However, it only uses that connection string as a way to discover the current primary at the time of starting the restore. If a primary failover occurs during the restore, then mongorestore just logs a bunch of "error: EOF" and doesn't retry inserting the documents. Since the writes are being performed with w="majority" by default in a replica set, it should be possible to have mongorestore automatically retry the insert commands on network errors, "not master" errors, etc., and to ignore any resulting DuplicateKey error responses the server may return.

      The current behavior of mongorestore has made it painful for me to migrate 1TB of data over to a new Atlas cluster.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              max.hirschhorn@mongodb.com Max Hirschhorn
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: