[SERVER-36255] Prohibit $out with readConcern level "linearizable" Created: 24/Jul/18  Updated: 29/Oct/23  Resolved: 12/Sep/18

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

Type: Task Priority: Major - P3
Reporter: Kyle Suarez Assignee: Kyle Suarez
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
is documented by DOCS-12053 Docs for SERVER-36255: Prohibit $out ... Closed
Related
is related to SERVER-20445 Add support for majority read concern... Closed
Backwards Compatibility: Minor Change
Sprint: Query 2018-09-24
Participants:

 Description   

In MongoDB 4.0 and earlier, we explicitly ban readConcern level "majority" for aggregation pipelines containing $out.

    auto readConcernLevel = repl::ReadConcernArgs::get(expCtx->opCtx).getLevel();
    uassert(ErrorCodes::InvalidOptions,
            "$out cannot be used with a 'majority' read concern level",
            readConcernLevel != repl::ReadConcernLevel::kMajorityReadConcern);

However, it does allow readConcern level "linearizable". As linearizability is a property of a single document, we will ban a $out aggregation with readConcern level "linearizable", as it isn't clear what semantics will be offered to our users.

This is a backwards-breaking change in 4.2; however, we will allow support for readConcern level "majority" in $out pipelines in SERVER-20445.



 Comments   
Comment by Githook User [ 12/Sep/18 ]

Author:

{'name': 'Kyle Suarez', 'email': 'kyle.suarez@mongodb.com', 'username': 'ksuarz'}

Message: SERVER-36255 prohibit $out with readConcern level "linearizable"
Branch: master
https://github.com/mongodb/mongo/commit/86126607271d98c67785ea5d884351dad39d8d8a

Comment by Kyle Suarez [ 01/Aug/18 ]

Changing this ticket to instead ban readConcern level "linearizable".

Comment by Kyle Suarez [ 24/Jul/18 ]

Throwing into Needs Triage to debate allowing "linearizable" and testing it, or banning it altogether.

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