-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
This came up when working on SERVER-123662.
Summary
The setQuerySettings command reply is inconsistent between inserting a new
query settings entry and updating an existing one. When featureFlagPQSBackfill
is enabled, an update reply omits representativeQuery, whereas an insert
reply (and the pre-flag behavior) includes it.
Background
Under featureFlagPQSBackfill the representative query is persisted separately
(in config.queryShapeRepresentativeQueries) and is intentionally cleared from
the querySettings cluster parameter entry.
- On the insert path, the code clears the representative query from the stored
entry but re-attaches it to the reply object before returning — so the reply
includes representativeQuery. - On the update path, the code clears the representative query on the entry and
then reuses that same cleared object as the reply — so the reply omits
representativeQuery.
See SetQuerySettingsCommand::Invocation::setQuerySettings in
src/mongo/db/commands/query_cmd/query_settings_cmds.cpp.
Goal
The setQuerySettings reply should echo representativeQuery consistently
for both inserts and updates whenever a representative query was supplied,
regardless of featureFlagPQSBackfill.
- is related to
-
SERVER-123662 Per-knob merge semantics for queryKnobs in mergeQuerySettings
-
- Closed
-