Details
-
Bug
-
Resolution: Done
-
Major - P3
-
3.4.0
-
None
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."