-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
QI 2023-05-01, QI 2023-05-15, QI 2023-05-29
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
If mongod is started with –setParameter enableComputeMode=true, it only supports collection-level aggregations that reference at least one external data source. It would be nice to support database-level aggregations (i.e. {aggregate: 1} commands) in this mode as well so that stages like $documents can be executed successfully.
Update by Yoonsoo:
Example repro:
In one window
$ build/install/bin/mongod --setParameter enableComputeMode=true
In test shell of another window
> db.aggregate([{$documents: [{a: 1}]}]);
Error message is thrown by this code
https://github.com/10gen/mongo/blob/master/src/mongo/db/commands/pipeline_command.cpp/#L128
We can do early return before the above check if the aggregate command is a collectionless one.