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

Support IDL 'type' under 'server_parameters'

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Service Arch
    • Execution Team 2023-03-20

    Description

      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.

      Attachments

        Activity

          People

            backlog-server-servicearch Backlog - Service Architecture
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: