Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-59926

Appending bindata to a Document limits the size to BSONObjMaxUserSize - 1

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:

      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.

        Attachments

          Activity

            People

            Assignee:
            backlog-query-execution Backlog - Query Execution
            Reporter:
            ali.mir Ali Mir
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: