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

Use object rather than object_owned in GenericArguments

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch

      The GenericArguments struct, which as of SERVER-85791 is automatically chained to all IDL-defined commands, currently uses object_owned for all its document fields to ensure they own their own data. To avoid making unnecessary copies of these fields, we should update them to use object instead, which is just a view into the underlying BSON. In order for this to be safe, we need to make sure that parsed IDL command structs do not outlive their source BSON. One way to achieve this is to parse them using parseSharingOwnership.

            Assignee:
            Unassigned Unassigned
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: