summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_graph_lookup.cpp
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2018-02-12 18:39:46 -0500
committerCharlie Swanson <charlie.swanson@mongodb.com>2018-02-27 11:16:08 -0500
commita77297dbe34d5cd838a4da55e9d83dc70c510bba (patch)
tree31af6e80ce89e6f0cfdde8f5ea66691f1bb03bff /src/mongo/db/pipeline/document_source_graph_lookup.cpp
parentf5c2680d3e3f28f4e32e2f5fbbbc61c39d55c2c8 (diff)
downloadmongo-a77297dbe34d5cd838a4da55e9d83dc70c510bba.tar.gz
SERVER-33174 Prevent catalog storage of new syntax during lower FCV
This will prevent the persistence of expressions introduced in 4.0 while the server is in feature compatibility version (FCV) 3.6.
Diffstat (limited to 'src/mongo/db/pipeline/document_source_graph_lookup.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_graph_lookup.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mongo/db/pipeline/document_source_graph_lookup.cpp b/src/mongo/db/pipeline/document_source_graph_lookup.cpp
index 07fac74d963..46eec709cd3 100644
--- a/src/mongo/db/pipeline/document_source_graph_lookup.cpp
+++ b/src/mongo/db/pipeline/document_source_graph_lookup.cpp
@@ -545,14 +545,9 @@ intrusive_ptr<DocumentSource> DocumentSourceGraphLookUp::createFromBson(
// We don't need to keep ahold of the MatchExpression, but we do need to ensure that
// the specified object is parseable and does not contain extensions.
- auto parsedMatchExpression =
- MatchExpressionParser::parse(argument.embeddedObject(), expCtx);
-
- uassert(40186,
- str::stream()
- << "Failed to parse 'restrictSearchWithMatch' option to $graphLookup: "
- << parsedMatchExpression.getStatus().reason(),
- parsedMatchExpression.isOK());
+ uassertStatusOKWithContext(
+ MatchExpressionParser::parse(argument.embeddedObject(), expCtx),
+ "Failed to parse 'restrictSearchWithMatch' option to $graphLookup");
additionalFilter = argument.embeddedObject().getOwned();
continue;