-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Command Operations
-
None
Several commands, e.g. findAndModify, may be used to insert or replace a document that is up to the exact 16MB max BSON object size. MongoDB servers allow this, and therefore should be allowed by the driver for.
Currently however the extra surrounding "envelope" bytes of the message cause the total payload size to exceed 16MB, tripping the OutMessage validation.
Example stack trace:
com.mongodb.MongoInternalException: DBObject of size 16777340 is over Max BSON size 16777216 at com.mongodb.OutMessage.putObject(OutMessage.java:291) at com.mongodb.OutMessage.writeQuery(OutMessage.java:211) at com.mongodb.OutMessage.query(OutMessage.java:84) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:285) at com.mongodb.DB.command(DB.java:262) at com.mongodb.DB.command(DB.java:229) at com.mongodb.DB.command(DB.java:214) ...
- is related to
-
JAVA-1189 Allow command documents to exceed maxBsonObjectSize
- Closed