Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-53203

Type check parameters in IDL compatibility checker script

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • Fully Compatible
    • Repl 2021-02-08, Repl 2021-02-22, Repl 2021-03-08

      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
      

            Assignee:
            ali.mir@mongodb.com Ali Mir
            Reporter:
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: