summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/pipeline.h
diff options
context:
space:
mode:
authorCharlie Swanson <charlie.swanson@mongodb.com>2019-02-06 12:23:23 -0500
committerCharlie Swanson <charlie.swanson@mongodb.com>2019-02-14 16:54:47 -0500
commitf1da8170c1c568762b29e44910afbcc6f01a644f (patch)
tree6c45403feafcc9748500bb809cb0d7c5a6ce19de /src/mongo/db/pipeline/pipeline.h
parentb494c59557d464d1e13f7c36e7148b48e4d87208 (diff)
downloadmongo-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/pipeline.h')
-rw-r--r--src/mongo/db/pipeline/pipeline.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/pipeline.h b/src/mongo/db/pipeline/pipeline.h
index 7c06f4adbd0..849143dd94e 100644
--- a/src/mongo/db/pipeline/pipeline.h
+++ b/src/mongo/db/pipeline/pipeline.h
@@ -233,9 +233,10 @@ public:
/**
* Returns any other collections involved in the pipeline in addition to the collection the
- * aggregation is run on.
+ * aggregation is run on. All namespaces returned are the names of collections, after views have
+ * been resolved.
*/
- std::vector<NamespaceString> getInvolvedCollections() const;
+ stdx::unordered_set<NamespaceString> getInvolvedCollections() const;
/**
* Serializes the pipeline into a form that can be parsed into an equivalent pipeline.