[DOCS-2910] Upgrade instructions for 2.6 should warn about new behavior of ensureIndex Created: 13/Mar/14  Updated: 15/Mar/14  Resolved: 15/Mar/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: v1.3.2

Type: Task Priority: Critical - P2
Reporter: Cailin Nelson Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: sprint-slipstream
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 9 years, 48 weeks, 4 days ago

 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.



 Comments   
Comment by Githook User [ 15/Mar/14 ]

Author:

{u'username': u'kay-kim', u'name': u'kay', u'email': u'kay.kim@10gen.com'}

Message: DOCS-2910 ensureIndex with name but diff key spec
Branch: master
https://github.com/mongodb/docs/commit/f48e792513aae2db0f3c9492599da28d04b927e5

Generated at Thu Feb 08 07:44:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.