diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2019-02-06 12:23:23 -0500 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2019-02-14 16:54:47 -0500 |
commit | f1da8170c1c568762b29e44910afbcc6f01a644f (patch) | |
tree | 6c45403feafcc9748500bb809cb0d7c5a6ce19de /src/mongo/db/pipeline/document_source_facet.cpp | |
parent | b494c59557d464d1e13f7c36e7148b48e4d87208 (diff) | |
download | mongo-f1da8170c1c568762b29e44910afbcc6f01a644f.tar.gz |
SERVER-38360 Prevent $out writing to ns read from in the same pipeline
This restriction only applies to $out with modes "insertDocuments" and
"replaceDocuments".
Diffstat (limited to 'src/mongo/db/pipeline/document_source_facet.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_facet.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/document_source_facet.cpp b/src/mongo/db/pipeline/document_source_facet.cpp index ab927d4f228..c3085279e8f 100644 --- a/src/mongo/db/pipeline/document_source_facet.cpp +++ b/src/mongo/db/pipeline/document_source_facet.cpp @@ -208,10 +208,11 @@ Value DocumentSourceFacet::serialize(boost::optional<ExplainOptions::Verbosity> return Value(Document{{"$facet", serialized.freezeToValue()}}); } -void DocumentSourceFacet::addInvolvedCollections(vector<NamespaceString>* collections) const { +void DocumentSourceFacet::addInvolvedCollections( + stdx::unordered_set<NamespaceString>* collectionNames) const { for (auto&& facet : _facets) { for (auto&& source : facet.pipeline->getSources()) { - source->addInvolvedCollections(collections); + source->addInvolvedCollections(collectionNames); } } } |