Details
-
Task
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
None
-
Query Execution
Description
When working with documents, appending BinData to a doc limits the size of the binary data to be BSONObjMaxUserSize - 1, instead of BSONObjMaxUserSize.
This seems to be because when we append the data field, we use the function RCString::create, linked here. This function uasserts if the size of the data is greater than or equal to the BSONObjMaxUserSize, to account for the NULL. For binary data, we don't have to account for the NULL.
Not sure if this is worth fixing, but thought I'd bring it up because while working with binary data in documents for the agg portion of File-Copy Based Initial Sync I've had to manually decrement BSONObjMaxUserSize in a few places to prevent getting error like Tried to create string longer than 16MB.