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

Java Driver caches indexes internally, which causes indexes if indexes are managed by multiple apps

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Java Driver 2.8.0

    Description

      Java Driver caches index information when using DBCollection.ensureIndex method that makes it unusable if there are multiple apps managing indexing/db.

      DBCollection.createIndex on the other hand does not cache this information.

      The mongo console does not have the createIndex method, but instead it has ensureIndex.

      The behavior of the JS vs Java ensureIndex is expected to be the same.

      The caching behavior is not documented anywhere.

      In addition, adding this kind of functionality to a db driver does not make sense, as it should serve as a proxy between the applications and the database. The application can decide whether or not to cache such information.

      Attachments

        Activity

          People

            Unassigned Unassigned
            okrook Oleg Krook
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: