[SERVER-20495] MapReduceResult.find() and drop() error when outputting to a different DB Created: 18/Sep/15 Updated: 01/Oct/19 Resolved: 01/Oct/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | MapReduce, Shell |
| Affects Version/s: | 3.1.8 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Robert Guo (Inactive) | Assignee: | Robert Guo (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||
| Steps To Reproduce: |
|
|||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||
| Description |
|
DBCollection's mapreduce function returns a MapReduceResult object, which takes in the result of db.runCommand(mapreduce). If the output is to a different db (i.e. when the "out" parameter is specified with an action instead of a collection name), the result is an object instead of a collection name string. This is passed into MapReduceResult and stored as the collection name, which in this case gets parsed as the string "[object BSON]". This variable is used by MapReduceResult.find() and MapReduceResult.drop(). The two functions are not documented so maybe they could be cleaned up a bit. |
| Comments |
| Comment by Arun Banala [ 25/Sep/19 ] |
|
robert.guo Now that |