[JAVA-3989] Change estimatedDocumentCount() to use the $collStats Agg Stage Instead of Count Command Created: 04/Feb/21  Updated: 28/Oct/23  Resolved: 12/Feb/21

Status: Closed
Project: Java Driver
Component/s: Query Operations
Affects Version/s: None
Fix Version/s: 4.3.0

Type: Improvement Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
Server Compat: 4.9
Quarter: FY22Q2

 Description   

DRIVERS Ticket Description
Script Target - If you can read this text, the script has failed


 Comments   
Comment by Jeffrey Yemin [ 12/Feb/21 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Use $collStats aggregation stage for estimatedDocumentCount

The count command is still used when server version is < 5.0

JAVA-3989

Branch: master
https://github.com/mongodb/mongo-java-driver/commit/05ed7df816dcc6e9f08c66d3b2945086d2699979

Generated at Thu Feb 08 09:00:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.