-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Execution
-
QE 2024-06-10, QE 2024-06-24, QE 2024-07-08, QE 2024-07-22, QE 2024-08-05, QE 2024-08-19, QE 2024-09-02
The project will extend $collStats to take in an "operationStats" option that returns the top output for the collection. In this ticket, we want to add an $operationStats option to $collStats (similar to other options like storageStats, latencyStats, etc). When the feature flag is enabled, it should be a no-op, and when feature flag is disabled, it should fail similar to how an invalid option to collStats would, like so:
> db.c.aggregate(\\{$collStats: {invalidOption: {}}}) uncaught exception: Error: command failed: { "ok" : 0, "errmsg" : "BSON field '$collStats.invalidOption' is an unknown field.", "code" : 40415, "codeName" : "Location40415" } with original command request: { "aggregate" : "c", "pipeline" : [ { "$collStats" : { "invalidOption" : { } } } ], "cursor" : { } , "lsid" : { "id" : UUID("d814fdd3-4846-4fc6-a08f-80b947473352") } } on connection: connection to 127.0.0.1:27017 : aggregate failed :
- is depended on by
-
SERVER-91457 Return top output for $collStats when the operationStats option is supplied
- Closed