[SERVER-69977] Extend RemoteCommandRunner API to allow for Generic Passthrough Fields Created: 26/Sep/22 Updated: 29/Oct/23 Resolved: 20/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.3.0-rc0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | George Wangensteen | Assignee: | Jason Chan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Sprint: | Service Arch 2022-12-26, Service Arch 2022-10-17, Service Arch 2022-10-31, Service Arch 2022-11-14, Service Arch 2022-11-28, Service Arch 2022-12-12, Service Arch 2023-01-09, Service Arch 2023-01-23 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Currently, IDL commands are not aware of the generic fields that can be appended to any command. Nor are there response types aware of the data that can be appended to any response. See https://github.com/10gen/mongo/blob/master/src/mongo/idl/generic_argument.idl. We need to allow users of the new RemoteCommandRunnerAPI to add these fields to requests and introspect their values in responses. Two possible solutions are
Update following six-week-review - we're going to pursue a middle-ground between the above two solutions. We're going to add a new C++ structure that acts as a container for all of the generic arguments (excluding dbName), that offers the functionality of serializing the arguments to the BSON/BSONObj builder of a command correctly. The new API will take this as argument for a command invocation. Additionally, we will return a parallel c++ structure holding generic response data in the API's command response type. In the long run, we should remove the need for this by incorporating generic field setting and getting into the IDL for commands and replies, but an initial spike proved this to be a non-trivial change that we should pursue in the future. For now, let's add the new generic response/reply structures and incoporate them into the API. |
| Comments |
| Comment by Githook User [ 20/Jan/23 ] |
|
Author: {'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com', 'username': 'jasonjhchan'}Message: |