[SERVER-6335] aggregation framework: disallow $where in $match Created: 06/Jul/12 Updated: 15/Aug/12 Resolved: 12/Jul/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 2.1.2 |
| Fix Version/s: | 2.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Pintarelli | Assignee: | Mathias Stearn |
| Resolution: | Done | Votes: | 0 |
| Labels: | crash | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
linux x86-64 |
||
| Operating System: | ALL |
| Participants: |
| Description |
|
server gets a segfault when using $where operator in a pipeline, e.g.: db.blah.aggregate({$match: {$where: "return true;"}}) crashes the server. |
| Comments |
| Comment by auto [ 13/Jul/12 ] |
|
Author: {u'date': u'2012-07-13T07:30:36-07:00', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}Message: |
| Comment by auto [ 12/Jul/12 ] |
|
Author: {u'date': u'2012-07-12T14:53:45-07:00', u'email': u'mathias@10gen.com', u'name': u'Mathias Stearn'}Message: |
| Comment by Robert Pintarelli [ 10/Jul/12 ] |
|
I tried to reduce the number of "$unwind" and "$group" steps in an aggreation pipeline with a single $where construct to test which pipeline performs better. |
| Comment by Mathias Stearn [ 09/Jul/12 ] |
|
@Robert: do you have a use case where $where is needed in aggregation? There shouldn't be anything that needs it at this point. One exception would be accessing other objects through the db variable, but that wouldn't work correctly anyway. |
| Comment by Mathias Stearn [ 09/Jul/12 ] |
|
$where can't be supported for 2.2 because it will not work in mongos |