Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15023

mapReduce out option is order sensitive

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.4.8, 2.6.4
    • Component/s: MapReduce
    • Labels:
      None
    • ALL

      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
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: