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

Update server param types of IDL Enum to use new IDL syntax

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Programmability 2024-11-25

      Instead of relying on the cpp_class workaround to simulate a server parameter of type IDL enum with this syntax:

      planRankerMode:
      description: "Control ranking method of query plans."
      set_at: [ startup, runtime ]
      cpp_class:
      name: QueryPlanRankerMode
      data: synchronized_value<QueryPlanRankerModeEnum>
      default:
      expr: QueryPlanRankerModeEnum::kMultiPlanning
      redact: false

      You can now use this syntax instead (without adding a separate class and append/setFromString method definitions).

      planRankerMode:
      description: "Control ranking method of query plans."
      set_at: [ startup, runtime ]
      cpp_varname: planRankerMode
      cpp_vartype: synchronized_value<QueryPlanRankerModeEnum>

      default:
      expr: QueryPlanRankerModeEnum::kMultiPlanning
      redact: false
       
      Need to delete the now unnecessary code added for the workaround from before. This includes deleting plan_ranker_mode.cpp and replacing a line in query_knob_configuration.cpp with _planRankerMode = *planRankerMode;

            Assignee:
            adithi.raghavan@mongodb.com Adithi Raghavan
            Reporter:
            adithi.raghavan@mongodb.com Adithi Raghavan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: