Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-711

Deprecate mapparams, out.sharded, and out.nonAtomic arguments to mapReduce

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Component/s: None
    • Labels:
      None
    • SERVER fixVersion:
      4.4

      Description

      Epic Summary

      Summary

      The mapReduce command will be rewritten in server 4.4 to use an agg pipeline under the covers. As a result of that work certain options supported by the existing command will no longer be supported or will change behavior. There is no CRUD spec definition for mapReduce, but multiple drivers provide helpers. Those drivers may have to deprecate the options that will change or no longer be supported in 4.4, or skip tests when connected to a 4.4+ server.

      These are the changes from the server scope doc:

      • The following will be ignored in 4.4
        • jsMode: Specifies whether to convert intermediate data into BSON format between the execution of the map and reduce functions. There will be no option to maintain intermediate objects as JavaScript objects.
        • out.nonAtomic with a value of true: MapReduce will no longer hold either MODE_X database or global write locks for the duration of write to an output collection. This is in line with the previous nonAtomic: true behavior.
      • The following will be rejected in 4.4 and deprecated in 4.2
        • out.nonAtomic with a value of false: MapReduce will no longer hold either MODE_X database or global write locks for the duration of write to an output collection.
        • out.sharded with a value of false. In the legacy implementation specifying this has the same behavior as omitting the out.sharded option.
        • out.sharded with a value of true, when the output collection does not already exist as a sharded collection
          For the legacy implementation, On output to a non-existent collection will shard that collection with the _id field as shard key. In the new implementation iIf users require a sharded output collection, they will have to create/shard prior to executing mapReduce.
          This option is currently required to output to a sharded collection even if the collection exists. In order to support mapReduce to a sharded collection during upgrade, we will allow but ignore out.sharded:true with MR in aggregation.
        • mapparams: Takes an array and passes each element as an argument to the map function. This parameter is undocumented and we believe does not serve a purpose given the ability to provide constants via "scope" argument.
        • User-defined functions (map, reduce, finalize) as CodeWScope

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              backlog-server-pm Backlog - Core Eng Program Management Team
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: