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

Caching Behavior Inconsistent when Dropping Indexes

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • 2.9.1
    • Command Operations
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adamc Adam Comerford
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: