[SERVER-15023] mapReduce out option is order sensitive Created: 25/Aug/14  Updated: 25/Aug/14  Resolved: 25/Aug/14

Status: Closed
Project: Core Server
Component/s: MapReduce
Affects Version/s: 2.4.8, 2.6.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Asya Kamsky Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-5378 Position of parameters within out {} ... Closed
Operating System: ALL
Participants:

 Description   

We fail if the out option does not have the type of out in the first position:

> db.foo.mapReduce(map2,red2,{out:{replace:"shTest",db:"newdb", sharded:true}})
2014-08-25T11:22:26.173-0400 map reduce failed:{
	"code" : 13297,
	"ok" : 0,
	"errmsg" : "exception: error creating initial database config information :: caused by :: can't have 2 databases that just differ on case  have: newDB want to add: newdb"
} at src/mongo/shell/collection.js:1224
> db.foo.mapReduce(map2,red2,{out:{replace:"shTest",db:"newDB", sharded:true}})
// works

That was 2.4.8

In 2.6 it fails instead with:

> db.foo.mapReduce(map2,red2,{out:{db:"newDB", replace:"shTest",sharded:true}})
2014-08-25T12:06:26.098-0400 map reduce failed:{
	"ok" : 0,
	"errmsg" : "MR parallel processing failed: { ok: 0.0, errmsg: \"ns doesn't exist\" }"
} at src/mongo/shell/collection.js:1224



 Comments   
Comment by Scott Hernandez (Inactive) [ 25/Aug/14 ]

dup of SERVER-5378

Generated at Thu Feb 08 03:36:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.