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

Create an APIParameters class

    • 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 an APIParameters class with methods getApiVersion, getApiStrict, and getApiDeprecationErrors. This class decorates OperationContext (see the top of read_concern_args.cpp for an example). The reason we need a separate class from APIParametersFromClient is because an IDL-generated class cannot decorate an operation context. In execCommandDatabase/runCommand, add something like:

      APIParameters::get(opCtx) = APIParameters::fromClient(apiParamsFromClient);

      ... where apiParamsFromClient is the APIParametersFromClient instance.

      This change may not be testable until we use the new class for something, e.g. checking if the currently executing command supports the client's requested API version.

            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: