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

Map/Reduce, emit() should not allow undefined as key

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Trivial - P5
    • Resolution: Unresolved
    • Affects Version/s: 2.0.6
    • Fix Version/s: Backlog
    • Component/s: MapReduce
    • Environment:
      OSX (not sure if that's relevant)

      Description

      The map function allows emit() to emit an undefined value for the key.

      When many such emits occur, the reduce step will fail complaining that the value is too large to reduce.

      I can't see a situation where I would ever want to allow a key to be undefined, so I would like emit to throw an exception on the emit(). If changing the default behavior is undesirable, some sort of 'strict' flag that enforced this would be nice.

      Personally, I ran into this because I ran a new M/R against an old collection. I don't see it as a big deal for production systems, but at least the option to fail fast might speed up the development cycle.

        Attachments

          Activity

            People

            Assignee:
            backlog-server-query Backlog - Query Team
            Reporter:
            andydavis Andy Davis
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: