[SERVER-55960] IDL generated code should pass field name to serializer Created: 08/Apr/21  Updated: 29/Oct/23  Resolved: 09/Apr/21

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

Type: Bug Priority: Minor - P4
Reporter: Benety Goh Assignee: Benety Goh
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-51371 Create IDL definition for writeConcern Closed
is related to SERVER-54956 Move away from using Bson_serializati... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2021-04-19
Participants:

 Description   

Most serializer functions for IDL defined types accept both a field name and the BSONObjBuilder. This does not currently apply when the BSON serialization type consists of a list of primitive types. Example

    writeConcernW:
        bson_serialization_type:
                                 - string
                                 - int
                                 - decimal
                                 - double
                                 - long

The serializer function for this IDL type accepts a single BSONObjectBuilder parameter. It would be more consistent if we could amend the contract so that the IDL generated code passes two function parameters to this serializer. This issue is more apparent when converting the bson_serialization_type field from any to a list of basic types.



 Comments   
Comment by Githook User [ 09/Apr/21 ]

Author:

{'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}

Message: SERVER-55960 always pass field name to IDL serializer
Branch: master
https://github.com/mongodb/mongo/commit/eff94d95aeb52906cb8066159606e1e0f0f81565

Comment by Benety Goh [ 08/Apr/21 ]

The example in the description is from SERVER-51371.

The conversion from any to a list of types is applicable to SERVER-54956.

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