-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
DB Integration & Observability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
The helper that records query stats at the end of a write (collectQueryStats in write_ops_exec.cpp) takes an ExpressionContext argument that is never read. It forwards it to collectQueryStatsMongod(opCtx, expCtx, key), which does not read it either. Callers that have no expression context, such as inserts and bulkWrite ops, have to pass nullptr.
Proposed change
- Drop the expCtx parameter from collectQueryStats and update its callers.
- Drop it from the key-based collectQueryStatsMongod overload as well, and update the find/aggregate/count/distinct callers.
No behavior change is expected.
- related to
-
SERVER-137435 Collect query stats for bulkWrite ops in standalone
-
- In Code Review
-