DBCollection.count returns long, DBCursor.count truncates to int

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.8.0, 2.9.0, 2.9.1
    • Component/s: API, Command Operations
    • None
    • None
    • Major Change
    • None
    • None
    • None
    • None
    • None
    • None

      Similar to CSHARP-254.

      Mongo does not limit the number of document to 2^32, so DBCollection has it right. DBCursor defers to the same server command, so there's no good reason to return something different here beyond not breaking code written against DBCursor.count. Currently, count on a cursor over a very large collection will truncate, which isn't great.

      Adding this detail as a separate issue so that the fix can be included in some release where forcing some client-app cleanup is ok.

            Assignee:
            Unassigned
            Reporter:
            Matt Schemmel
            None
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: