[SERVER-51848] Specify generic arguments in IDL Created: 27/Oct/20  Updated: 29/Oct/23  Resolved: 11/Nov/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 5.0.0-rc0

Type: Task Priority: Major - P3
Reporter: A. Jesse Jiryu Davis Assignee: A. Jesse Jiryu Davis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: Repl 2020-11-02, Repl 2020-11-16
Participants:
Linked BF Score: 0

 Description   

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.



 Comments   
Comment by Githook User [ 11/Nov/20 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-51848 Rename generic arg/reply functions
Branch: master
https://github.com/mongodb/mongo/commit/90cfa3eeb18000ca3081e83be66ca4eaa244665e

Comment by Githook User [ 11/Nov/20 ]

Author:

{'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}

Message: SERVER-51848 Specific generic args in IDL
Branch: master
https://github.com/mongodb/mongo/commit/c4f0c53602d42366c9c16b0f92482a35440c1828

Generated at Thu Feb 08 05:26:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.