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

mapReduce and eval not recognized by mongos

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      The piece of code runs fine on mongod, but running on mongos would raise the exception:

      error

      { "$err" : "unrecognized command: mapReduce", "code" : 13390 }

      changing the command to use small caps mapreduce runs fine on both mongod and mongos.

      db.bar.insert({ x: 1 });
      var map = function() { emit( this.x, 1 ); };
      var reduce = function( key, values ) { return 1; };
      var mrResult = db.runCommand({ mapReduce: 'bar', map: map, reduce: reduce, out: { inline: 1 }});

      Similarly, the following works on mongod but not mongos:

      db.runCommand({eval: function () { print("noop"); } });

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              siyuan.zhou Siyuan Zhou
              Reporter:
              renctan Randolph Tan
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: