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

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Service Arch
    • ALL
    • 3

      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).

            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            jack.mulrow@mongodb.com Jack Mulrow
            6 Vote for this issue
            55 Start watching this issue