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

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

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Component/s: None
    • Labels:
      None
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      NODE-2160 Won't Do
      JAVA-3429 Fixed 4.1.0
      PYTHON-1980 Won't Do
      PHPLIB-480 Fixed 1.6.0
      CXX-1816 Won't Do
      MOTOR-388 Won't Do
      CSHARP-2738 Fixed 2.11.0
      GODRIVER-1307 Won't Do
      RUBY-1930 Won't Do
      CDRIVER-3365 Won't Do
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion NODE-2160 Won't Do JAVA-3429 Fixed 4.1.0 PYTHON-1980 Won't Do PHPLIB-480 Fixed 1.6.0 CXX-1816 Won't Do MOTOR-388 Won't Do CSHARP-2738 Fixed 2.11.0 GODRIVER-1307 Won't Do RUBY-1930 Won't Do CDRIVER-3365 Won't Do

      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

            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

              Created:
              Updated:
              Resolved: