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

Parse Versioned API parameters

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • Repl 2020-07-13, Repl 2020-07-27

      Create a class APIParametersFromClient that parses the three API parameters. All parameters are "optional". Imitate OperationSessionInfoFromClient in logical_session_id.idl.

      Create a function initializeAPIParameters in a new file initialize_api_parameters.cpp; imitate initialize_operation_session_info.cpp. The new function checks the following rule (from the "Command Syntax" section in the scope doc): If the client passed apiStrict and/or apiDeprecationErrors but not apiVersion, reply with InvalidOptions.

      In execCommandDatabase in service_entry_point_common.cpp (mongod) and runCommand in strategy.cpp (mongos), create an APIParametersFromClient instance with initializeAPIParameters.

      Write a JSTest to check that the rules are enforced on mongod and mongos.

      (More rules will be enforced in a later ticket.)

            Assignee:
            pridhvi.vegesna@mongodb.com Pridhvi Vegesna (Inactive)
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: