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

drop_index fails with OperationFailure if no index found on collection

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.7.1, 3.0
    • Affects Version/s: 2.6.3
    • Component/s: None
    • None
    • Environment:
      CentOS 6.2

      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

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

              Created:
              Updated:
              Resolved: