Caching Behavior Inconsistent when Dropping Indexes

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.9.1
    • Component/s: Command Operations
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Based on testing, it seems that the caching behavior of the Java driver in terms of the dropped indexes is different based on how the drop of indexes is called.

      Does NOT remove cached indexes:

      DBObject command = Documents.build("dropIndexes", collectionName).append("index", "*").get();
      db.command(command);
      

      DOES remove cached indexes:

      collection.dropIndexes()
      

      This behavior can cause subsequent re-addition of indexes to fail (as a no-op essentially, there is no indication of the fact that the index has not been created) and can cause significant issues when indexes fail to be added.

              Assignee:
              Unassigned
              Reporter:
              Adam Comerford (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: