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

    • Bug
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • ALL
    • 3

    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

              backlog-server-servicearch Backlog - Service Architecture
              jack.mulrow@mongodb.com Jack Mulrow
              Votes:
              6 Vote for this issue
              Watchers:
              46 Start watching this issue

              Dates

                Created:
                Updated: