-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
Repl 2020-11-02, Repl 2020-11-16
-
0
In command_generic_argument.cpp is a list of arguments accepted by all commands, and fields that may be included in any command's reply. Move this list to IDL. Create command_generic_argument.idl with four structs:
- generic_args_api_v1: A struct that defines API Version 1 generic arguments.
- generic_args_unstable_v1: A struct that defines all the other generic arguments.
- generic_reply_fields_api_v1: A struct that defines the fields that are included in API Version 1, and can appear in any command's reply.
- generic_reply_fields_unstable_v1: A struct that defines the unstable/undocumented fields that can appear in any command's reply.
Use the new IDL options forward_to_shards and forward_from_shards to mark fields in these structs, preserving the options specified in command_generic_argument.cpp today.
The IDL compiler will automatically generate command_generic_argument*_gen*.h/.cpp from this IDL file. Rewrite command_generic_argument.h/.cpp to use the generated code. We will not explicitly include these generic arguments in any IDL commands. Instead, all commands will still implicitly accept all generic arguments the same as today, whether these commands are defined in IDL or not. The new IDL file is used for compatibility checking.