Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-639

CollectionStatsResult.MaxDocuments throws an InavlidCastException for capped collections

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.8
    • Affects Version/s: 1.7
    • Component/s: None
    • None

      The driver is expecting the server to return MaxDocuments as an Int32, but it's actually being returned as a Double, which is causing an InvalidCastException.

      Make the driver able to deal with MaxDocuments returned as any numeric type (by calling ToInt32 instead of AsInt32).

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            robert@mongodb.com Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: