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

Translate tests in other directories to use $merge

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.12
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • Query 2019-06-03
    • 0

      By "other" I mean outside of those covered by SERVER-41199 and SERVER-41198.

      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"
      }}

            Assignee:
            jacob.evans@mongodb.com Jacob Evans
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: