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

Replace usages of BSON-manipulating generic argument helper functions with generic_argument_util equivalents

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • Networking & Obs 2024-06-10, Networking & Obs 2024-06-24, Networking & Obs 2024-07-08, Networking & Obs 2024-07-22, Networking & Obs 2024-08-05, Networking & Obs 2024-08-19, N&O Needs Merge

      There are a few helper functions in CommandHelpers that manipulate a request's BSON for the purposes of appending generic arguments. Now that generic arguments can be set on IDL-generated command structs (SERVER-85791), these helpers are redundant and should be replaced with the newer equivalents in generic_argument_util. They're also not as performant as the newer ones, as they can include scans of the BSON.

      We should delete these helpers and update their usages to use the functions in generic_argument_util, which operate over IDL-generated command structs.

      In particular, we should replace:

      • appendGenericCommandArgs
      • appendWCToObj
      • appendMajorityWriteConcern

      And there's also a number in cluster_commands_helpers.h for appending certain fields that we should replace as well.

      filterCommandRequestForPassthrough will be addressed in a separate ticket.

            Assignee:
            joseph.prince@mongodb.com Joseph Prince
            Reporter:
            patrick.freed@mongodb.com Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: