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

first group request failed on slave with error code 10209 : name has to be a string

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • master,slave: OS: ubuntu server 10.10, mongo 1.6.5
      arbiter: OS: ubuntu 10.10, mongo 1.6.4
    • Linux

    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 }

      ]
      >

      Attachments

        Activity

          People

            Unassigned Unassigned
            maxim.berezhnoy Maxim Berezhnoy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: