dselivanov / rmongodb

R driver for MongoDB
53 stars 26 forks source link

Gridfs broken for Mongodb 2.4.10+ #92

Closed fred777 closed 8 years ago

fred777 commented 8 years ago

I was getting the following error message from mongod when inserting data with size>255k via mongo.gridfs.store:

should have chunk: 0 have:152

Simple cause: Since Mongodb 2.4.10, chunk size has been changed from 256k to 255k: https://docs.mongodb.org/manual/core/gridfs/

Simple fix: set DEFAULT_CHUNK_SIZE in src/libmongo/gridfs.h to 255k ;-)

But I'm not sure if this will break backwards compatibility...

dselivanov commented 8 years ago

@fred777 thx! can you please send pull request?

fred777 commented 8 years ago

Done: https://github.com/mongosoup/rmongodb/pull/95