[SERVER-55899] Move away from using Bson_serialization_type “any” - Collation Created: 08/Apr/21  Updated: 29/Oct/23  Resolved: 29/Apr/21

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

Type: Task Priority: Major - P3
Reporter: Benety Goh Assignee: Milena Ivanova
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-56496 Complete TODO listed in SERVER-55899 Closed
is related to SERVER-56387 Check optionalBool-typed IDL fields f... Closed
is related to SERVER-54956 Move away from using Bson_serializati... Closed
Backwards Compatibility: Fully Compatible
Sprint: Query Optimization 2021-05-03
Participants:

 Description   

Using Bson_serialization_type “any” means that idl compatibility checker script can’t do any type checking, since that logic is in cpp, so we want to disallow this type from parameters/reply fields as a result.

However, lots of commands actually use it for valid reasons.
For now we added some exceptions to allow using Bson_serialization_type “any” in our idl_checker script, these are the lisf of fields that still using Bson_serialization_type “any” that require your attention:

 

src/mongo/db/commands/create.idl:

  1. 'create' has sub-field of type 'Collation:' which contains 'backwards' of type 'optionalBool'

Take a look at these fields and try to identify which ones can be converted away from using Bson_serialization_type “any”, and which ones must keep using it.
Here are the two outcomes:
1- if the field can be converted:

  • This change should be done before 5.0 (if the field is "stable") as this will be the realese for API stable Version 1
  • The exception for that field should be removed from idl_checker script (TODO will be added with this ticket number).

2- if the field can't be converted, or the change can't be done before 5.0.

  • The type of that field type should stay of Bson_serialization_type “any” and can't be changed later for any reason unless it is defined as "unstable".
  • We need to put comments on the serialization/deserialization to prevent the behavioral changes (preferably to add tests to ensure that.)

 

 



 Comments   
Comment by Githook User [ 05/May/21 ]

Author:

{'name': 'Milena Ivanova', 'email': 'milena.ivanova@mongodb.com', 'username': 'mivanova3'}

Message: SERVER-56496 Complete TODO listed in SERVER-55899
Branch: master
https://github.com/mongodb/mongo/commit/8a24eacb196b679b8f7dbf28b55b79ee60c5a523

Comment by Milena Ivanova [ 29/Apr/21 ]

This task adds unit tests for the serialization/ deserialization of IDL optionalBool type. The SERVER-56387 proposes improved long-term solution for the issue, which can be done after 5.0 release.

Comment by Githook User [ 28/Apr/21 ]

Author:

{'name': 'Milena Ivanova', 'email': 'milena.ivanova@mongodb.com', 'username': 'mivanova3'}

Message: SERVER-55899 Add serialization/deserialization unit test for IDL optionalBool type
Branch: master
https://github.com/mongodb/mongo/commit/2957e50d04bf5eb2d3ad2aabdd37f8a63b10835d

Comment by Connie Chen [ 08/Apr/21 ]

Reassigning to to Query as we think they are the best team to address. This is definitely 5.0 required.

Comment by Benety Goh [ 08/Apr/21 ]

Originally filed as part of SERVER-54956.

The Collation IDL specification affects a different part of the server from CommitQuorum and requires different context.

CC: m.maher

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