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

Keep supporting finalize: null in mapReduce command

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 4.3.3
    • MapReduce
    • Fully Compatible
    • Query 2019-12-30

    Description

      A recent commit to master made it an error to pass a null value for the finalize field in a mapReduce command. The error is:

       {
         “ok”: 0.0, 
         “errmsg”: “‘finalize’ must be of string or code type”, 
         “code”: 2, 
         “codeName”: “BadValue”
        }  
      

      Previous versions of mongod treated this the same as a missing finalize field.

      Unfortunately, all existing releases of the Java driver trigger this error when there is no finalize function specified by the application. While we could easily update later releases to non include the field instead of sending a null value for it, any existing application that uses a current driver and updates their server will run into this.

      Please consider continuing to allow a null value for finalize.

      Update:

      The driver treats the query, sort, and scope fields similarly: it passes a null value if the application doesn't provide values. ]

      Attachments

        Issue Links

          Activity

            People

              ted.tuckman@mongodb.com Ted Tuckman
              jeff.yemin@mongodb.com Jeffrey Yemin
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: