-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 0.9
-
Component/s: None
-
None
In MongoDB.Bson.BsonDefaults,
private static int maxDocumentSize = 4 * 1024 * 1024; // 4MB
should be:
private static int maxDocumentSize = 4 * 1024 * 1024 * 4; // 4MB * 4 = 16MB
Otherwise, during a Read, the ReadSize method throws an error:
private int ReadSize() {
int size = buffer.ReadInt32();
if (size < 0)
if (size > settings.MaxDocumentSize)
{ throw new FileFormatException("Size is larger than MaxDocumentSize"); } return size;
}