[DRIVERS-2228] Use the count command instead of collStats to implement estimatedDocumentCount Created: 07/Mar/22  Updated: 07/Jul/22  Resolved: 07/Jul/22

Status: Closed
Project: Drivers
Component/s: Stable API
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Alexander Golin (Inactive) Assignee: Patrick Freed
Resolution: Done Votes: 0
Labels: size-small, spec-change
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-63850 Add the count command to API version 1 Closed
Issue split
split to CDRIVER-4309 Use the count command instead of coll... Closed
split to CSHARP-4095 Use the count command instead of coll... Closed
split to CXX-2464 Use the count command instead of coll... Closed
split to GODRIVER-2331 Use the count command instead of coll... Closed
split to MOTOR-908 Use the count command instead of coll... Closed
split to NODE-4079 Use the count command instead of coll... Closed
split to PYTHON-3167 Use the count command instead of coll... Closed
split to RUBY-2922 Use the count command instead of coll... Closed
split to JAVA-4530 Use the count command instead of coll... Closed
split to PHPLIB-810 Always use count command for estimate... Closed
split to RUST-1216 Use the count command instead of coll... Closed
Related
related to CXX-2473 Skip Versioned API Example 5 on 5.3+ ... Closed
Driver Changes: Needed
Server Compat: 5.0, 5.3, 6.0
Quarter: FY23Q2
Upstream Changes Summary:

The count command has been added to API version 1 for 6.0. With this change, the estimatedDocumentCount drivers helper can be changed to use the count command for versions 6.0.0+, as we previously the case for versions < 5.0.0.

This change would allow the estimatedDocumentCount helper to return a count for non-materialized views.

Downstream Changes Summary:

Drivers should update their estimatedDocumentCount implementations to use the count command, regardless of the wire version of the connected server. The unified CRUD tests, legacy retryable reads tests, Atlas Data Lake tests, and the versioned API spec tests will need to be synced to mongodb/specifications@021cbc8. Lastly, the "Count API Details" section of the CRUD spec includes some documentation and release notes requirements that drivers will need to adhere to.

Driver Compliance:
Key Status/Resolution FixVersion
CDRIVER-4309 Fixed 1.22.0, 1.22.0-beta0
CXX-2464 Fixed 3.7.0
CSHARP-4095 Fixed 2.16.0
GODRIVER-2331 Done 1.10.0, 1.10.0-beta1
JAVA-4530 Fixed 4.7.0
NODE-4079 Done 4.7.0
MOTOR-908 Duplicate
PYTHON-3167 Fixed 4.2
PHPLIB-810 Fixed 1.13.0-beta1, 1.13.0
RUBY-2922 Fixed 2.18.0
RUST-1216 Fixed 2.3.0
SWIFT-1515 Fixed 1.4.0

 Description   

TBD pending decisions on SERVER-63850



 Comments   
Comment by Githook User [ 02/May/22 ]

Author:

{'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}

Message: DRIVERS-2228 Fix runOnRequirements for `estimatedDocumentCount` stable API tests, add test for views (#1202)
Branch: master
https://github.com/mongodb/specifications/commit/021cbc80e1e444023fd05d8092df4546e639db40

Comment by Githook User [ 26/Apr/22 ]

Author:

{'name': 'Patrick Freed', 'email': 'patrick.freed@mongodb.com', 'username': 'patrickfreed'}

Message: DRIVERS-2228 Revert to using the `count` command for `estimatedDocumentCount` (#1187)
Branch: master
https://github.com/mongodb/specifications/commit/c43037606247a689cb5ada0099b8628a2c495bdd

Generated at Thu Feb 08 08:25:03 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.