Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-736

Don't cache EnsureIndex and deprecate CreateIndex

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.8.2
    • Affects Version/s: 1.8.1
    • Component/s: None
    • None
    • Minor Change

      EnsureIndex attempts to remember which indexes already exist in order to avoid a round trip to the server if possible. However, this is fragile because EnsureIndex can't know what's going on in other processes. It is better to just let the server decide if the index already exists or not.

      Caching was the only difference between EnsureIndex and CreateIndex. Since these two methods now do the same thing we are deprecating CreateIndex (note that the shell deprecated createIndex as far back as version 1.8 of the server).

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: