Support IDL 'type' under 'server_parameters'

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • Execution Team 2023-03-20
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There is a HostAndPort IDL type, but it does not appear to be supported under 'server_parameters' IDL definitions. Attempting to do so like this:

      server_parameters:
          searchIndexAtlasHostAndPort:
              description: 'Search index Atlas host address'
              set_at: [ startup ]
              type: HostAndPort
              cpp_varname: gSearchIndexParams
      

      results in an error msg like this:

      ...
      Errors found while compiling IDL
      search_index_options.idl: (12, 8): ID0008: Unknown IDL node 'type' for YAML entity 'server_parameters'
      ...
      

      Instead of an easy IDL definition like above, it's necessary to create a CPP type and leverage it in the IDL, like done in this recent patch commit, where IDL looks like this

       server_parameters:
           searchIndexAtlasHostAndPort:
               description: 'Search index Atlas host address'
               set_at: [ startup ]
               default: ''
               cpp_varname: 'globalSearchIndexParams.host'
               validator:
                   callback: 'SearchIndexParams::onValidateHost'
      

      There is a second use case, doing the exact same thing, in this code.

            Assignee:
            Unassigned
            Reporter:
            Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: