[SERVER-37191] Add support for write concerns for new $out modes.  Created: 18/Sep/18  Updated: 29/Oct/23  Resolved: 31/Oct/18

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.1.5

Type: Bug Priority: Major - P3
Reporter: Martin Neupauer Assignee: Ian Boros
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-44827 Aggregate with $merge fails with comm... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2018-10-08, Query 2018-11-05
Participants:

 Description   

Add support for write concerns for $out. 

aggregation/sources/out/use_cases.js had to be modified in order to pass aggregation_read_concern_majority_passthrough suites with exchange



 Comments   
Comment by Githook User [ 31/Oct/18 ]

Author:

{'name': 'Nick Zolnierz', 'email': 'nicholas.zolnierz@mongodb.com', 'username': 'nzolnierzmdb'}

Message: SERVER-37191 writeConcern for $out
Branch: master
https://github.com/mongodb/mongo/commit/c9290364162cd76697ebee76c63ec148cd305101

Comment by Andy Schwerin [ 12/Oct/18 ]

Have you talked to someone from the sharding team about this? I think this is OK, as long as you aren't counting on the retry happening at most once.

Comment by Nicholas Zolnierz [ 12/Oct/18 ]

I want to keep a paper trail of a couple of discussions regarding this ticket in case we need to revisit.

1. Pass through the writeConcern from mongos for all shard pipelines that include $out
2. Use the "idempotent" retry policy for $out writes, which is expected to retry if it encounters one of these errors. This includes writeConcern errors.
3. If the retry fails for whatever reason (including WCE), throw an error and abort the entire $out operation.

This is a bit different than my understanding after our in-person discussion, so I want to make sure we're all on the same page. schwerin, charlie.swanson sound OK to you? 

CC asya david.storch

Comment by David Storch [ 19/Sep/18 ]

As part of this work, we need to start propagating the $out's writeConcern when we dispatch exchange consumer pipelines.

Additionally, we need to make the $out code respect a writeConcern when targeting writes to other shards. It would be unfortunate to wait for replication every time we spill(), so we will have to think about how to achieve this.

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