Details

    • Backport:
      Done
    • Operating System:
      ALL
    • # Replies:
      2
    • Last comment by Customer:
      false

      Description

      >> db.test.insert(

      {x : 0}

      )
      >> var m = function()

      { emit(this.mod, this.x); }

      >> var r = function(k,v) { total = 0; for(i in v)

      { total+= v[i]; }

      return total; }
      >> db.test.mapReduce(m, r,

      {out : "test.out"}

      )
      {
      "result" : "test.out",
      "timeMillis" : 1,
      "counts" :

      { "input" : 1, "emit" : 1, "output" : 1 }

      ,
      "ok" : 1,
      }

      In the result, _id is undefined (it looks like null in the shell, but if you do a mongodump you can see it's type 6).

      ----------

      This causes problems with replication (i.e., stops it completely).

        Activity

        Hide
        auto
        added a comment -

        Author:

        {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

        Message: fix m/r handling of undefined SERVER-2861
        Branch: master
        https://github.com/mongodb/mongo/commit/8cd20b51fd4defa44343decb235a5053d66381d6

        Show
        auto
        added a comment - Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'} Message: fix m/r handling of undefined SERVER-2861 Branch: master https://github.com/mongodb/mongo/commit/8cd20b51fd4defa44343decb235a5053d66381d6
        Hide
        auto
        added a comment -

        Author:

        {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'}

        Message: fix m/r handling of undefined SERVER-2861
        Branch: v1.8
        https://github.com/mongodb/mongo/commit/4b5f2b33e8e7e858990bd4837f37c82290b7150d

        Show
        auto
        added a comment - Author: {u'login': u'erh', u'name': u'Eliot Horowitz', u'email': u'eliot@10gen.com'} Message: fix m/r handling of undefined SERVER-2861 Branch: v1.8 https://github.com/mongodb/mongo/commit/4b5f2b33e8e7e858990bd4837f37c82290b7150d

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              2 years, 50 weeks, 6 days ago
              Date of 1st Reply: