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

Large internal metadata can trigger BSONObjectTooLarge for commands under the BSON size limit

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:
    • Operating System:
      ALL
    • Case:

      Description

      Before an internal request is sent, metadata may be added to it through registered hooks (e.g. $clusterTime, $audit). Eventually this metadata is combined with the request's command body into an op msg, which will fail with BSONObjectTooLarge if the combined size of the metadata and command body is over the BSONObjMaxInternalSize limit.

      This is a problem for commands that are dynamically built within the server that can be near the size limit (like batch writes) because they don't currently account for the exact size of the metadata to be added, which can cause persistent BSONObjectTooLarge errors if the metadata is large enough, like with complicated LDAP roles (which leads to large $audit metadata).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-servicearch Backlog - Service Architecture
              Reporter:
              jack.mulrow Jack Mulrow
              Participants:
              Votes:
              2 Vote for this issue
              Watchers:
              27 Start watching this issue

                Dates

                Created:
                Updated: