-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
Repl 2021-02-08, Repl 2021-02-22, Repl 2021-03-08
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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