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

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

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Trivial - P5
    • Resolution: Gone away
    • 2.0.6
    • None
    • MapReduce
    • 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

            backlog-query-optimization Backlog - Query Optimization
            andydavis Andy Davis
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: