Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-667

drop_index fails with OperationFailure if no index found on collection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 2.6.3
    • 2.7.1, 3.0
    • None
    • None
    • CentOS 6.2

    Description

      Trying to drop a non-existing index results in the following:

      Actual result:

      command SON([('dropIndexes', u'MyCollection'), ('index', 'my_index')])failed: index not found

      While the method description says:
      "...Can be used on non-existant collections or collections with no indexes..."

      Expected result:

      should be handled by allowable_errors, exactly as in case of "ns not found"

      Environment details:
      > uname -a
      Linux ... 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux
      > mongo shell
      MongoDB shell version: 2.4.8
      > pip freeze | grep pymongo
      pymongo==2.6.3

      Attachments

        Activity

          People

            bernie@mongodb.com Bernie Hackett
            maxb Max
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: