-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Serverless
-
Fully Compatible
-
Server Serverless 2023-03-06, Server Serverless 2023-03-20
SerializationContext are currently tied to the `deserialize_with_tenant` flag being used in IDL config files. In some of these cases, C++ types are imported by defining these types in the IDL config, and they contain custom serializers and deserializers that are called verbatim.
Specifically, the function _gen_field_deserializer_expression() in the IDL generator will create the custom deserializer, and passes the tenantId in but does not pass the SerializationContext in. These flags are used in both serialization and deserialization, so we will need to add it for serialization as well (in _gen_serializer_method_custom()), but this might require modifying the behavior of the associated BsonCppTypeBase.
This will also affect the target C++ files, which currently include auth_name and document_source_merge_spec as per user_management_commands_parser.idl and document_source_merge.idl, respectively.
In particular, mergeTargetNssParseFromBSON creates an IDLParserContext that will need to be populated with the SerializationContext, while the auth_name changes are only necessary to normalize the function signature.
- is depended on by
-
SERVER-74284 Fix existing tests for command serialization/deserialization
- Closed
-
SERVER-76084 Create targeted tests for command de/serialization
- Closed