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

Type check parameters in IDL compatibility checker script

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: Replication
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Sprint:
      Repl 2021-02-08, Repl 2021-02-22, Repl 2021-03-08

      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
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: