[SERVER-12828] Reindexing drops indexes if key contains values too large to index Created: 21/Feb/14 Updated: 10/Dec/14 Resolved: 23/Feb/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 2.6.0-rc0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeff lee | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||
| Steps To Reproduce: |
|
|||||||||||||||||||||
| Participants: | ||||||||||||||||||||||
| Description |
|
Prior to 2.6, if you have an index on a key and try to insert a value that is too large to index, the insert succeeds, but the index is not updated. This was changed in 2.6, but if you do an upgrade and try to reindex a collection that has existing values that are too large, the index is dropped and the rebuild fails. |
| Comments |
| Comment by Daniel Pasette (Inactive) [ 23/Feb/14 ] |
|
If a user has documents with index keys longer than the maximum in 2.6, the workaround is to use the server parameter detailed in |
| Comment by Jeff lee [ 21/Feb/14 ] |
|
Thanks Dan. Asya pointed this exists as a warning in the release notes. |
| Comment by Asya Kamsky [ 21/Feb/14 ] |
|
Release notes do describe this as expected behavior post-upgrade: http://docs.mongodb.org/master/release-notes/2.6/#stricter-enforcement-of-index-key-length-limit |
| Comment by Daniel Pasette (Inactive) [ 21/Feb/14 ] |
|
Jeff, The behavior with issues related to the stricter enforcement of index key length is described here: |