-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
Migrate $queryStats tests that live in jstests/noPassthrough/query/queryStats/ (~90 files) into passthrough suites, using per-command query knob overrides instead of cluster-wide setParameter.
Background
Most $queryStats tests are in noPassthrough largely because they set cluster-wide server parameters (internalQueryStatsSampleRate, internalQueryStatsRateLimit, internalQueryStatsWriteCmdSampleRate, internalQueryStatsCacheSize) via setParameter, which leaks state across tests and is incompatible with passthrough suites. As a result, query stats coverage misses the breadth of topologies and behaviors passthrough suites exercise (sharded clusters, stepdowns, BWC, etc.), and new feature tests keep accruing in noPassthrough (e.g. SERVER-97670's query_stats_in_transaction.js).
Depends on SERVER-134528, which makes the sampling knobs settable per-command via runCommand(..., querySettings: {queryKnobs: {...)}}.
Scope of Work* Migrate tests whose only noPassthrough justification is server-parameter state
- Keep genuinely noPassthrough tests (failpoints, node restarts, topology-specific setup) where they are, or split them
- Prefer passthrough suites for new query stats tests going forward
Acceptance Criteria
- Query stats tests that don't require failpoints/restarts run in passthrough suites
- No regression in query stats coverage
- is blocked by
-
SERVER-134528 Make internalQueryStatsSampleRate and internalQueryStatsWriteCmdSampleRate settable via (P)QS queryKnobs
-
- Backlog
-
- is related to
-
SERVER-97670 $queryStats captures if the query shape is being executed in a transaction
-
- In Code Review
-