-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Minor Change
-
Query 2018-09-24
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.
- is related to
-
SERVER-20445 Add support for majority read concern level to Aggregation $out
- Closed