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

Undo 4.2 changes to $out

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.14
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Query 2019-05-06, Query 2019-05-20, Query 2019-06-03, Query 2019-06-17

      Description

      Remove any special kind of $out stage, translate existing tests to use $merge:

      Written as   Translates to

      {$out: {
        to: "x",
        uniqueKey: {x_id: 1},
        mode: "insertDocuments"
      }}

      {$merge: {
        into: "x",
        on: "x_id"
        whenMatched: "fail",
        whenNotMatched: "insert"
      }}

      {$out: {
        to: "x",
        uniqueKey: {x_id: 1},
        mode: "replaceDocuments"
      }}

      {$merge: {
        into: "x",
        on: "x_id",
        whenMatched: "replaceWithNew",
        whenNotMatched: "insert"
      }}

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              anton.korshunov Anton Korshunov
              Reporter:
              charlie.swanson Charlie Swanson
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: