MaxSize is ignored when creating a capped collection

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.0
    • Affects Version/s: 2.0
    • Component/s: API, Operations
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When creating a capped collection using the new driver with the old API (i.e. client.GetServer().) the MaxSize is ignored and the resulting collection is capped at 1GB:

      new MongoClient()
          .GetServer()
          .GetDatabase("HamsterSchool")
          .CreateCollection("Hamsters", CollectionOptions.SetCapped(true).SetMaxSize(5368709120));
      

      Using the new API however sets the correct MaxSize:

      await new MongoClient().GetDatabase("HamsterSchool")
          .CreateCollectionAsync("Hamsters",
              new CreateCollectionOptions
              {
                  Capped = true,
                  MaxSize = 5368709120
              });
      

              Assignee:
              Unassigned
              Reporter:
              Bar Arnon
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: