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

Translate $out tests in jstests/sharding to use $merge

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.12
    • Component/s: Aggregation Framework
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Epic Link:
    • Sprint:
      Query 2019-06-03

      Description

      For this task we just want to translate tests of modes "insertDocuments" and "replaceDocuments". Don't worry about removing duplicate coverage, that will be done by SERVER-41197.

      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

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: