diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2017-12-19 14:31:36 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2017-12-19 17:29:29 -0500 |
commit | b5a2cc0fec6ac30b1a0196da5feb41d85a8b76c3 (patch) | |
tree | 4147e3b4ffbfea86eec107e7d6a6d777bded033d /src/mongo/db/views | |
parent | bd9c109958c1721767f5432683706c62ec90fe30 (diff) | |
download | mongo-b5a2cc0fec6ac30b1a0196da5feb41d85a8b76c3.tar.gz |
SERVER-32190 Make MongoProcessInterface always available
Diffstat (limited to 'src/mongo/db/views')
-rw-r--r-- | src/mongo/db/views/view_catalog.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/db/views/view_catalog.cpp b/src/mongo/db/views/view_catalog.cpp index 9b4f7e7178f..3809ca0b94c 100644 --- a/src/mongo/db/views/view_catalog.cpp +++ b/src/mongo/db/views/view_catalog.cpp @@ -49,6 +49,7 @@ #include "mongo/db/pipeline/expression_context.h" #include "mongo/db/pipeline/lite_parsed_pipeline.h" #include "mongo/db/pipeline/pipeline.h" +#include "mongo/db/pipeline/stub_mongo_process_interface.h" #include "mongo/db/query/collation/collator_factory_interface.h" #include "mongo/db/server_parameters.h" #include "mongo/db/storage/recovery_unit.h" @@ -244,6 +245,10 @@ StatusWith<stdx::unordered_set<NamespaceString>> ViewCatalog::_validatePipeline_ new ExpressionContext(opCtx, request, CollatorInterface::cloneCollator(viewDef.defaultCollator()), + // We can use a stub MongoProcessInterface because we are only parsing + // the Pipeline for validation here. We won't do anything with the + // pipeline that will require a real implementation. + std::make_shared<StubMongoProcessInterface>(), std::move(resolvedNamespaces)); auto pipelineStatus = Pipeline::parse(viewDef.pipeline(), std::move(expCtx)); if (!pipelineStatus.isOK()) { |