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

mongodump fails if a collection is dropped before it's dumped

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • mongodump
    • 3.0.6
    • 2
    • 1,276

    Description

      While dumping a database with mongodump if a collection is dropped before it was dumped, the mongodump will fail.

      mongodump should be able to tolerate such failures at least with --oplog option.

      Steps to reproduce:
      1) Create two collections with some records.
      2) Start mongodump and when it starts dumping the first collecton, suspend the process (SIGSTOP)
      3) Drop the second collection
      4) Resume the mongodump process (SIGCONT)

      It should fail as:

      writing test.c1 metadata to dump/test/c1.metadata.json
      2015-12-26T18:53:09.909+1100	done dumping test.c1 (10000 documents)
      2015-12-26T18:53:09.910+1100	writing test.mgendata to dump/test/mgendata.bson
      2015-12-26T18:53:09.915+1100	writing test.mgendata metadata to dump/test/mgendata.metadata.json
      2015-12-26T18:53:09.915+1100	Failed: error running `listIndexes`. Collection: `test.mgendata` Err: no collection
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: