[CDRIVER-4309] Use the count command instead of collStats to implement estimatedDocumentCount Created: 11/Mar/22  Updated: 28/Oct/23  Resolved: 19/May/22

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.22.0, 1.22.0-beta0

Type: Task Priority: Major - P3
Reporter: PM Bot Assignee: Jeremy Mikola
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CXX-2464 Use the count command instead of coll... Closed
Issue split
split from DRIVERS-2228 Use the count command instead of coll... Closed
Related
related to CDRIVER-4506 /Samples failure due to count command... Closed
is related to CDRIVER-3905 Change estimatedDocumentCount() to us... Closed
Server Compat: 5.0, 5.3, 6.0
Quarter: FY23Q2
Upstream Changes Summary:

DRIVERS-2228:
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.

Backwards Compatibility: Minor Change

 Description   

This ticket was split from DRIVERS-2228, please see that ticket for a detailed description.



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

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: CDRIVER-4309 document behavior for estimated_document_count (#1001)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/22a86962567478c4fc9ffe29c91ad1edcd8c2b12

Comment by Jeremy Mikola [ 18/May/22 ]

https://github.com/mongodb/mongo-c-driver/pull/1001

Comment by Jeremy Mikola [ 06/May/22 ]

Reverting to "In progress" so I can make a follow-up PR with the necessary documentation notes.

Comment by Jeremy Mikola [ 06/May/22 ]

Marking "BC: Minor Change". Per the CRUD spec, we should highlight this change in the ensuing release notes.

Comment by Githook User [ 06/May/22 ]

Author:

{'name': 'Jeremy Mikola', 'email': 'jmikola@gmail.com', 'username': 'jmikola'}

Message: CDRIVER-4309: always use count command for estimatedDocumentCount (#984)

  • always use count command for estimatedDocumentCount
  • Update spec tests for estimatedDocumentCount

Synced with mongodb/specifications@021cbc80e1e444023fd05d8092df4546e639db40

Includes some test changes for CDRIVER-4063 and CDRIVER-4330

  • Ignore "ns not found" error for dropCollection operations

This requires setting MONGOC_ERROR_API_VERSION_2 on clients under test. It was previously only set on the internal client.

Comment by Jeremy Mikola [ 05/May/22 ]

https://github.com/mongodb/mongo-c-driver/pull/984

Comment by Jeremy Mikola [ 03/May/22 ]

Currently included in the PR for CDRIVER-4199: https://github.com/mongodb/mongo-c-driver/pull/982

Generated at Wed Feb 07 21:20:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.