QueryKnobRegistry: unified runtime registry for query knobs

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • Fully Compatible
    • QE 2026-05-11, QE 2026-04-27
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Unified runtime registry for all query knobs, initialized at server startup. Consumes self-registering QueryKnob<T> descriptors, scans ServerParameterSet for parameters carrying query_knob annotations, matches each descriptor to its annotation, assigns dense indices, and builds the wire-name lookup map.

      Each registry entry carries:

      • QueryKnobBase* descriptor (for readGlobal, fromBSON)
      • ServerParameter* (for write-path validate())
      • wireName (for PQS wire-name lookup and explain output)
      • pqsSettable flag
      • applicability list
      • minFcv

      PQS-settable knobs get a StringMap<size_t> wire-name index entry. Non-PQS knobs get registry entries but no wire-name index entry. Initialization runs as a MONGO_INITIALIZER with prerequisite EndServerParameterRegistration. After init the registry is immutable. The core build logic accepts a ServerParameterSet& parameter so it can be unit-tested with synthetic parameters and annotations.

      C++ unit tests with synthetic knobs, similar to how we test IDL server parameters in server_parameter_with_storage_test.cpp.

            Assignee:
            Catalin Sumanaru
            Reporter:
            Catalin Sumanaru
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: