Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.8.2, 1.9.0
    • Component/s: MapReduce
    • Labels:
      None
    • Operating System:
      ALL

      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).

        Issue Links

          Activity

          Hide
          auto auto (Inactive) 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 auto (Inactive) 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 auto (Inactive) 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 auto (Inactive) 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:
                4 years, 5 weeks, 2 days ago
                Date of 1st Reply: