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

Remove BSONObj anchors from IDL generated types that do not need it

    • Service Arch
    • Fully Compatible
    • Service Arch 2023-11-13, Service Arch 2023-11-27, Service Arch 2023-12-11, Service Arch 2023-12-25, Service Arch 2024-01-08, Service Arch 2024-01-22, Service Arch 2024-02-05, Service Arch 2024-02-19

      In SERVER-67826, a BSONObj anchor was added to every IDL generated type. This feature was added to ensure callers could avoid the need to deep copy BSONObj types and other view types.

      This BSONObj increases the size of every generated IDL type and sometimes is not needed. For instance, if a IDL generated type only consists of scalars, then the BSONObj is unnecessary. The generated API can remain same but for IDL generated types that do not benefit from this, it should be omitted from the generated C++ class. For instance OpLog has 5 of these anchors and several can be removed safely.

            alex.li@mongodb.com Alex Li
            mark.benvenuto@mongodb.com Mark Benvenuto
            0 Vote for this issue
            8 Start watching this issue