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

mongodump panics if collection doesn't exist

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.11
    • Affects Version/s: None
    • Component/s: mongodump
    • None

      If mongodump is run with a database/collection that doesn't exist, it panics with a nil pointer dereference. From a quick look, I think this is because GetCollectionInfo on prepare.go line 227 can return nil if the collection isn't found, but this isn't checked anywhere. A similar problem was addressed in the mongoexport port to the new driver by checking if the collection exists before exporting any documents.

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: