Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4530

Use the count command instead of collStats to implement estimatedDocumentCount

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: CRUD
    • Labels:
    • Hide

      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.

      Show
      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.
    • Fully Compatible
    • Needed
    • Hide

      I think this requirement from the spec belongs in release notes or reference docs, not API docs:

      Drivers MUST document that, due to an oversight in versions 5.0.0-5.0.8 of MongoDB, the count command, which estimatedDocumentCount uses in its implementation, was not included in v1 of the Stable API, and so users of the Stable API with estimatedDocumentCount are recommended to upgrade their server version to 5.0.9+ or set apiStrict: false to avoid encountering errors.

      Show
      I think this requirement from the spec belongs in release notes or reference docs, not API docs: Drivers MUST document that, due to an oversight in versions 5.0.0-5.0.8 of MongoDB, the count command, which estimatedDocumentCount uses in its implementation, was not included in v1 of the Stable API, and so users of the Stable API with estimatedDocumentCount are recommended to upgrade their server version to 5.0.9+ or set apiStrict: false to avoid encountering errors.

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

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: