[SERVER-30783] MatchExpressions that have an "init()" function should instead take those arguments at construction time Created: 22/Aug/17 Updated: 30/Oct/23 Resolved: 14/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.1 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kyle Suarez | Assignee: | Kyle Suarez |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Sprint: | Query 2017-10-02, Query 2017-10-23, Query 2017-11-13, Query 2017-12-04 |
| Participants: |
| Description |
|
There are several match expression that have an init() method. This seems silly, and opens the way for people to use match expressions before calling init(), which is almost always a Bad Thing. Instead, we should make those match expressions take those arguments in their constructor, so that the objects are always in a valid state. |
| Comments |
| Comment by Githook User [ 14/Nov/17 ] |
|
Author: {'name': 'Blake Oler', 'username': 'BlakeIsBlake', 'email': 'blake.oler@10gen.com'}Message: |
| Comment by Kyle Suarez [ 13/Nov/17 ] |
|
I made a giant rebase of Blake's commit and will be intermittently rebasing it onto the tip of master as we make changes to the matcher. It's living on my fork here: https://github.com/ksuarz/mongo/tree/init |
| Comment by Kyle Suarez [ 22/Aug/17 ] |
|
I filed this ticket because I was typing on match expressions and was getting spurious segmentation violations because I had inadvertently forgotten to init a match expression, which is annoying. |