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

Keep supporting finalize: null in mapReduce command

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.3
    • Affects Version/s: None
    • Component/s: MapReduce
    • Labels:
    • Fully Compatible
    • Query 2019-12-30

      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. ]

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

              Created:
              Updated:
              Resolved: