[SERVER-2199] mapReduce command doesn't tolerate null finalize attribute Created: 09/Dec/10 Updated: 12/Jul/16 Resolved: 16/Jan/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.6.4 |
| Fix Version/s: | 1.7.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Luke Maurer | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
It appears that MR chokes if passed a null finalize function: > res = db.items.mapReduce(m, r); , ); The log indicates "can't convert type: 10 to code", which I take to mean MongoDB tried to treat the finalize attribute as code without first checking that it's null. Note that this is not the behavior of the query attribute: > res = db.items.mapReduce(m, r, { query: null }); , Besides simple consistency (and the lack of a more specific error message), it would be nice for MR to be null-safe in finalize because I have some utility code that handles cases both with and without a finalize attribute, and the easy thing is just to pass null as the finalize attribute in cases without it. (I can give illustrative Python code if needed.) |
| Comments |
| Comment by auto [ 16/Jan/11 ] |
|
Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}Message: handle null finalize in m/r |