[SERVER-13688] Picky errors from 2.6 are needlessly backwards incompatible Created: 22/Apr/14 Updated: 10/Dec/14 Resolved: 19/May/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.6.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Thomas Boutell | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | compatibility | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Steps To Reproduce: | db.foo.update({$set: {}}); }).hint( { foo: 1 }); |
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
MongoDB 2.6 will throw an error in the following situations:
All three of these are a hassle to avoid when building queries dynamically. Perhaps an error log level for "linting" would be a more appropriate place to report this kind of thing.
The move to 2.6 has been worth it for us due to the availability of text searches as part of normal queries, which is a big improvement in the ease of writing query builder code. Thank you for that change. |
| Comments |
| Comment by Thomas Boutell [ 19/May/14 ] |
|
I appreciate that there is something you want the developer to know here, and suggest using a warning rather than a fatal error to convey it. |
| Comment by Thomas Boutell [ 19/May/14 ] |
|
Why is it necessary to force everyone who writes code that calls hint() to do a special scan to be sure their query builder didn't touch the $text "third rail"? Why not just ignore hint() in this situation, like you used to in situations where you did not support it? |
| Comment by Daniel Pasette (Inactive) [ 19/May/14 ] |
|
| Comment by Jeremy Mikola [ 22/Apr/14 ] |
|
Cross-referencing with |