Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-667

Caching Behavior Inconsistent when Dropping Indexes

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.9.1
    • Component/s: Command Operations
    • Labels:
      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 Unassigned
            Reporter:
            adamc Adam Comerford
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: