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

Keep supporting finalize: null in mapReduce command

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.3
    • Component/s: MapReduce
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      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

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

                Dates

                Created:
                Updated:
                Resolved: