Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9121

db.collection.count documentation unclear on accuracy

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Works as Designed
    • 3.4.0
    • None
    • manual
    • None
    • true

    Description

      https://docs.mongodb.com/master/reference/method/db.collection.count/#behavior

      This page suggests that db.collection.count() can be inaccurate when run against a sharded cluster,

      However, if a query predicate is supplied, and the query is run via a mongoS, the count() will be accurate.

      Please amend, for example by adding a note similar to the one below for "Accuracy after Unexpected Shutdown". Or by changing the wording to something along the lines of "On a sharded cluster, count() without a query clause can result in an inaccurate count if orphaned documents exist or if a chunk migration is in progress."

      Attachments

        Activity

          People

            ravind.kumar Ravind Kumar (Inactive)
            john.murphy@mongodb.com John Murphy
            Jonathan Dahl Jonathan Dahl
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              5 years, 8 weeks, 3 days ago