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.
- depends on
-
SERVER-122105 IDL compiler generic annotations: block
-
- Closed
-
-
SERVER-123122 QueryKnob<T> descriptor infrastructure
-
- Closed
-
- is depended on by
-
SERVER-121945 QuerySettingsKnobOverlay C++ class
-
- Open
-
-
SERVER-125395 QueryKnobRegistry: detect C++/storage type mismatches at startup
-
- Open
-
-
SERVER-123181 Refactor QueryKnobConfiguration to snapshot model
-
- Backlog
-