You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mongodb documentation (not spring) outlines two different count calls - one is count() and the other is countDocuments()
After having a highly intermittent issue with an integration test receiving one less count than expected right after a write, I looked into potential problems with the count() query not being consistent, or fully accurate.
Here I discovered that count() can be inaccurate in certain situations, so in order to be 100% accurate, we'd have to do a countDocuments() call.
Issue is - the spring mongo data library only has a count() call. I cannot find any documentation about if the java .count() call maps to mongo's count() query or countDocuments() query.
Requests:
Add documentation for what spring mongo data's repository.count() maps to query-wise in mongo - count() or countDocuments()
if count() maps to count(), please add another method for repository.countDocuments()
Putting Label as "Spring" as I don't know if this is only a documentation issue or not, it could potentially result in added functionality
Jeff opened DATAMONGO-2192 and commented
The mongodb documentation (not spring) outlines two different count calls - one is count() and the other is countDocuments()
After having a highly intermittent issue with an integration test receiving one less count than expected right after a write, I looked into potential problems with the count() query not being consistent, or fully accurate.
Here I discovered that count() can be inaccurate in certain situations, so in order to be 100% accurate, we'd have to do a countDocuments() call.
Issue is - the spring mongo data library only has a count() call. I cannot find any documentation about if the java .count() call maps to mongo's count() query or countDocuments() query.
Requests:
Putting Label as "Spring" as I don't know if this is only a documentation issue or not, it could potentially result in added functionality
Affects: 2.1.4 (Lovelace SR4)
Issue Links:
DATAMONGO-2509 Polish documentation for 3.0 release
DATAMONGO-2059 Replace usage of deprecated collection.count() with collection.countDocuments()
The text was updated successfully, but these errors were encountered: