[SERVER-53203] Type check parameters in IDL compatibility checker script Created: 03/Dec/20  Updated: 29/Oct/23  Resolved: 24/Feb/21

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Samyukta Lanka Assignee: Ali Mir
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Repl 2021-02-08, Repl 2021-02-22, Repl 2021-03-08
Participants:

 Description   

We should check that the type of each parameter in the new command is a superset of the type in the old command. This corresponds to the following pseudocode:

old_type := old_param's type
new_type := new_param's type
    
assert old_type.bson_serialization_type != "any"
assert new_type.bson_serialization_type != "any"
 
# Assert new_type ⊇ old_type.
if old_type is enum:
    assert new_type is enum
    assert new_type's values ⊇ old_type's values
elif old_type is struct:
    assert new_type is struct
else:
    assert new_type.bson_serialization_type ⊇ old_type.bson_serialization_type



 Comments   
Comment by Githook User [ 24/Feb/21 ]

Author:

{'name': 'Ali Mir', 'email': 'ali.mir@mongodb.com', 'username': 'ali-mir'}

Message: SERVER-53203 Type check parameters in IDL compatibility checker script
Branch: master
https://github.com/mongodb/mongo/commit/10a785a8b6d8016fb4380d8890af760fa04a18a7

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