[SERVER-40432] Undo 4.2 changes to $out Created: 01/Apr/19  Updated: 29/Oct/23  Resolved: 30/May/19

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

Type: Improvement Priority: Major - P3
Reporter: Charlie Swanson Assignee: Anton Korshunov
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-41198 Translate $out tests in jstests/aggre... Closed
depends on SERVER-41199 Translate $out tests in jstests/shard... Closed
depends on SERVER-41200 Translate tests in other directories ... Closed
depends on SERVER-40430 Add $merge support for whenMatched: '... Closed
depends on SERVER-40431 Add $merge support for whenMatched: p... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query 2019-05-06, Query 2019-05-20, Query 2019-06-03, Query 2019-06-17
Participants:

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



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

Author:

{'name': 'Anton Korshunov', 'email': 'anton.korshunov@mongodb.com', 'username': 'antkorsh'}

Message: SERVER-40432 Undo 4.2 changes to $out
Branch: master
https://github.com/mongodb/mongo/commit/fc05d715eb813ddc72d38c74c6a1c4e447ae1b76

Comment by Charlie Swanson [ 09/May/19 ]

Also david.storch following up on a conversation we had a little while ago, we're going to re-use this ticket to track the work to remove the code in document_source_out.cpp such as this method. We believe there's already some dead code in there now, but much more of it will be dead during this work.

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