Investigate changes in SERVER-79019: Allow $bsonSize expression on intermediate results >16MB

XMLWordPrintableJSON

    • Type: Investigation
    • Resolution: Declined
    • Priority: Major - P3
    • No version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      Original Downstream Change Summary

      The changes in this PR modify the $bsonSize expression implementation so that it does not throw BSONObjectTooLarge exceptions anymore when run on an input that is larger than the maximum permissible BSON object size (BSONObjMaxInternalSize) of 16MiB.

      Even with the changes from this PR, $bsonSize expressions will continue to throw BSONObjectTooLarge exceptions when run on inputs that are larger than the maximum buffer size for intermediate results (BufferMaxSize, 125MiB).

      Description of Linked Ticket

      In theory, in some cases it would be nice to select / deselect oversized events using $bsonSize function, e.g.:

      { $match: { $expr: { $lt: [{ $bsonSize: "$$ROOT" }, 16000000] } } }
      

      Currently though, the $bsonSize function will throw BSONObjectTooLarge error when applied to a large documents in intermediate results.

      It would be nice to allow $bsonSize expression on intermediate results >16MB.

            Assignee:
            Unassigned
            Reporter:
            Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: