-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
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.)
- depends on
-
SERVER-48864 New error codes for Versioned API
- Closed
- is depended on by
-
SERVER-48877 Create an APIParameters class
- Closed
-
SERVER-49065 Mark API Version 1 commands
- Closed
- is duplicated by
-
SERVER-48870 API parameter checking
- Closed