-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.0
-
Component/s: API, Operations
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 });