Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2910

Upgrade instructions for 2.6 should warn about new behavior of ensureIndex

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Critical - P2
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: v1.3.2
    • Component/s: manual
    • Last comment by Customer:
      true
    • Actual Time:
      4

      Description

      Many application frameworks perform the following action on startup: for every model object in the application, verify that the necessary indexes are in place by calling ensureIndex for each associated index.

      Prior to 2.6 ensureIndex was (annoyingly) forgiving. If you had previously defined the an index foo to be name,1 and then later you changed your code and defined it as username,1, when you re-ensured the index it would just silently do nothing.

      The 2.6 version of ensureIndex is stricter (yay!). However, this may cause many application developers off guard when doing the upgrade. If they have any indexes in their dbs that are not in tune with the ensureIndex commands executed by their framework, their applications will fail to start up. The previous forgiving nature of ensureIndex will unfortunately make this a common issue.

        Attachments

          Activity

            People

            Assignee:
            kay.kim Kay Kim (Inactive)
            Reporter:
            cailin.nelson Cailin Nelson
            Participants:
            Last commenter:
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since reply:
              7 years, 33 weeks, 4 days ago
              Date of 1st Reply: