-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
From https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#estimateddocumentcount :
estimatedDocumentCount
_
The 5.0-compat release accidentally broke estimatedDocumentCount on views by changing its implementation to use aggregate and a $collStats stage instead of the count command.
The new release is fixing estimatedDocumentCount on views by reverting back to using count in its implementation.
Due to an oversight, the count command was omitted from the Stable API in server versions 5.0.0 - 5.0.8 and 5.1.0 - 5.3.1, so users of the Stable API with estimatedDocumentCount are recommended to upgrade their MongoDB clusters to 5.0.9 or 5.3.2 (if on Atlas) or set apiStrict: false when constructing their MongoClients._
- related to
-
NODE-4079 Use the count command instead of collStats to implement estimatedDocumentCount
- Closed