-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 6.0.17, 7.0.14
-
Component/s: None
-
Query Integration
-
Fully Compatible
-
ALL
-
v6.0
This ticket concerns a pipeline like the following:
db.foo.aggregate([{$lookup: {from: "bar", pipeline: [{$documents: []}], as: "baz"}}])
Up until version 7.2, this pipeline was allowed, even though the from: "bar" piece isn't meaningful and should not be present. In SERVER-69836 (v7.2+) we started enforcing the namespacing rules better, making this pipeline return an error (which is still true on version 8.0 and on the master branch).
In versions before 7.2, this pipeline is legal and works correctly, ignoring the namespace. However, it confuses the code to compute the query shape, which causes the pipeline to return an error if and only if query stats is enabled (internalQueryStatsRateLimit parameter != 0). This is obviously a bug - query stats should not change the validation rules.
- is depended on by
-
SERVER-94226 Expand test coverage for nested pipelines with differently scoped namespaces
- Open
- is related to
-
SERVER-69836 mongos doesn't raise validation errors but returns empty cursors when the database doesn't exist
- Closed
-
SERVER-94227 Stop validating pipelines if re-parsing for query stats, plus a refactor
- Blocked
- related to
-
SERVER-94260 [v7.2+] Verify that $documents inside $lookup fails to parse
- Closed