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

friendlyEqual is not defined

    XMLWordPrintable

Details

    • ALL
    • Hide

      Create a collection named "test" and run the MapReduce above.

      Show
      Create a collection named "test" and run the MapReduce above.

    Description

      The following contrived MapReduce:

      db.test.mapReduce(
          function() {
              var map = new Map()
              map.put("A", "B")
       
              emit(map.get("A"), { count: 1 })
          },
          function(key, records) { 
              counter = { count: 0 }
              
              for (var idx = 0; idx < records.length; idx++) {
                  counter.count += records[idx].count
              }
              
              return counter
          },
          { 
            out: { inline: 1 }
          }
      )
      

      displays the following error:

      uncaught exception: map reduce failed:{
      	"errmsg" : "exception: ReferenceError: friendlyEqual is not defined\n    at Map._get (src/mongo/shell/types.js:516:13)\n    at Map.get (src/mongo/shell/types.js:505:17)\n    at _funcs1 (_funcs1:4:14) at src/mongo/shell/types.js:516",
      	"code" : 16722,
      	"ok" : 0
      }
      

      It would appear to me that perhaps utils.js is not loaded?

      Attachments

        Activity

          People

            backlog-query-optimization Backlog - Query Optimization
            scardis Steve Ardis
            Votes:
            1 Vote for this issue
            Watchers:
            12 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: