[SERVER-11374] Can create indexes on non-insertable fields (i.e. beginning with '$') Created: 25/Oct/13 Updated: 14/May/14 Resolved: 12/Nov/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.4 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Amalia Hawkins | Assignee: | Amalia Hawkins |
| Resolution: | Done | Votes: | 0 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Backwards Compatibility: | Minor Change | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
|
Can create indices, for example:
You can also create an index that contains an empty field name, i.e.: "x..a" As you cannot save/insert/upsert a field with that name, it seems like incorrect behavior to be able to index on it. |
| Comments |
| Comment by auto [ 12/Nov/13 ] |
|
Author: {u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}Message: Merge pull request #542 from hawka/server-11374b
|
| Comment by auto [ 12/Nov/13 ] |
|
Author: {u'username': u'hawka', u'name': u'Amalia Hawkins', u'email': u'amalia.hawkins@mongodb.com'}Message: |
| Comment by Scott Hernandez (Inactive) [ 12/Nov/13 ] |
|
We need to note that this is breaking as some people might have "bad" code creating these indexes without problem and with this code change it will break. If you migrate the first chunk to a server with this code, from one having the index already, it will cause the move to fail when trying to create the index. There may be more cases like this, for example, initial sync/replication. We may want to consider if this comes from replication/sharding (system init'd ops) we should not enforce these kinds of constraints. |
| Comment by auto [ 12/Nov/13 ] |
|
Author: {u'username': u'hawka', u'name': u'Amalia Hawkins', u'email': u'amalia.hawkins@mongodb.com'}Message: Signed-off-by: Matt Kangas <matt.kangas@mongodb.com> |