[SERVER-41200] Translate tests in other directories to use $merge Created: 17/May/19  Updated: 29/Oct/23  Resolved: 21/May/19

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: 4.1.12

Type: Task Priority: Major - P3
Reporter: Charlie Swanson Assignee: Jacob Evans
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-41201 Add replacement for "withEachOutMode" Closed
is depended on by SERVER-41197 De-duplicate $out and $merge testing Closed
is depended on by SERVER-40432 Undo 4.2 changes to $out Closed
Related
is related to SERVER-41198 Translate $out tests in jstests/aggre... Closed
is related to SERVER-41199 Translate $out tests in jstests/shard... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2019-06-03
Participants:
Linked BF Score: 0

 Description   

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



 Comments   
Comment by Githook User [ 21/May/19 ]

Author:

{'name': 'Jacob Evans', 'email': 'jacob.evans@10gen.com'}

Message: SERVER-41200 Change syntax from $out to $merge for tests in other directories
Branch: master
https://github.com/mongodb/mongo/commit/4087836e629b82120e22d9741caaf604fe95b5c2

Comment by Githook User [ 21/May/19 ]

Author:

{'name': 'Jacob Evans', 'email': 'jacob.evans@10gen.com'}

Message: SERVER-41200 Change syntax from $out to $merge for tests in other directories
Branch: master
https://github.com/mongodb/mongo/commit/ea0e6b047c98fd56118431d036ee686be0720226

Generated at Thu Feb 08 04:57:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.