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

Automatically chain generic reply fields to IDL structs marked as command replies

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Programmability 2024-06-24, Programmability 2024-07-08

      In SERVER-85791, the IDL compiler was updated to automatically chain generic argument lists to all IDL-defined command structs. This has the benefit of allowing all of a command's arguments to be parsed in a single pass of the request document (instead of at least 2), and it also allows generic arguments to be viewed/manipulated just like any other command argument, without needing to serialize to BSON, scan a BSON document, or reallocate a BSON document.

      We should do the same thing for generic reply fields. This will make constructing command responses more performant (by eliminated redundant scans and reallocations) and less error prone (e.g. by ensuring the correct types are used, duplicate fields are not appended, etc). This will also make the code easier to read.

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

              Created:
              Updated: