[SERVER-2368] first group request failed on slave with error code 10209 : name has to be a string Created: 17/Jan/11  Updated: 22/Mar/13  Resolved: 17/Jan/11

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

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

master,slave: OS: ubuntu server 10.10, mongo 1.6.5
arbiter: OS: ubuntu 10.10, mongo 1.6.4


Operating System: Linux
Participants:

 Description   

listing for reproduce:

$ mongo 192.168.100.70
MongoDB shell version: 1.6.4
connecting to: 192.168.100.70/test
> db.isMaster()
{
"setName" : "setname",
"ismaster" : true,
"secondary" : false,
"hosts" : [
"192.168.100.70:27017",
"192.168.100.41:27017"
],
"arbiters" : [
"192.168.100.40:27018"
],
"ok" : 1
}
> show collections
> db.data.insert(

{key:'a'}

)
> db.data.insert(

{key:'b'}

)
> db.data.insert(

{key:'a'}

)
> exit
bye
$ mongo 192.168.100.41

MongoDB shell version: 1.6.4
connecting to: 192.168.100.41/test
> db.isMaster()
{
"setName" : "setname",
"ismaster" : false,
"secondary" : true,
"hosts" : [
"192.168.100.41:27017",
"192.168.100.70:27017"
],
"arbiters" : [
"192.168.100.40:27018"
],
"primary" : "192.168.100.70:27017",
"ok" : 1
}
> db.getMongo().setSlaveOk()
> db.data.group({key:

{ key:true}

,reduce: function (obj, prev)

{ prev.count++; },initial: { count: 0 }});
Mon Jan 17 16:43:45 uncaught exception: group command failed: {
"errmsg" : "exception: name has to be a string",
"code" : 10209,
"ok" : 0
}
> db.data.group({key: { key:true},reduce: function (obj, prev) { prev.count++; }

,initial: { count: 0 }});
[

{ "key" : "a", "count" : 2 }

,

{ "key" : "b", "count" : 1 }

]
>



 Comments   
Comment by Eliot Horowitz (Inactive) [ 17/Jan/11 ]

See SERVER-2284

Generated at Thu Feb 08 02:59:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.