-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: 0.2
-
Component/s: None
-
Labels:None
Sticking a ~3GB file in the database (length of 2996783104 bytes) will break the C driver. I'm rusty on my C, but it appears everywhere we load "length" we use bson_iterator_int when it should probably be bson_iterator_double:
bson_find(&it, gfile->meta, "length");
length = bson_iterator_int(&it);
A full example is gridfile_get_numchunks: http://github.com/ctriolo/mongo-c-driver/blob/master/src/gridfs.c#L500-516
I would offer to help dig in and supply a patch, but before I do so I'd like someone with a better understanding of the driver to take a look and see if that is in fact the likely culprit.