[SERVER-7789] mapReduce on a sharded collection fails with $readPreference Created: 28/Nov/12 Updated: 15/Feb/13 Resolved: 17/Dec/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.2.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Randolph Tan |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Steps To Reproduce: | First, shard the collection that you're map/reducing over. mongos> db.runCommand( { "mapreduce" : "test", map : "function() {}", reduce : "function() {}", out : {inline:1}, "$readPreference" : { mode : "primary"}} ) { "ok" : 0, "errmsg" : "unknown m/r field for sharding: $readPreference" } |
||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Running a mapReduce against mongos on a sharded collection with a driver that supports $readPreference produces a server error: { "serverUsed" : "localhost/127.0.0.1:30999" , "ok" : 0.0 , "errmsg" : "unknown m/r field for sharding: $readPreference"} |
| Comments |
| Comment by zhu daniel [ 29/Nov/12 ] |
|
i got this problem too after i run m/r with 2.10.0 version of java driver. so changed the java driver to 2.9.1. now it works ok. |