-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
There is no concrete contract outlining the responsibilities of the AutoStatsTracker and its resulting metrics.
It's intended to be an RAII class to update diagnostic state on CurOp and report Top upon destruction.
Today, the AutoStatsTracker (1) ensures metric reporting has begun for curOp (2) changes the databaseProfiling level and updates the _nss on curOp (3) updates the Top() command metrics on destruction.
Ambiguities
It implicitly ensures active metrics recording on curOp , but doesn't guarantee when metrics recording will end / know if it has already started for curOp().
It reports metrics to Top() upon destruction, but there is no guarantee when the metrics started recording - is the time elapsed tracked by curOp representative of the scope of the AutoStatsTracker?
Additionally, its unclear when the AutoStatsTracker should be used and at what level in the code - when does an operation 'start' and and 'end', and what stats are of interest at what points in an operations trajectory.
- is depended on by
-
SERVER-84200 Complete TODO after SERVER-83174 (previously SERVER-79175)
- Backlog
- is duplicated by
-
SERVER-79175 Improve AutoStatsTracker usage in distinct and find commands
- Closed
- related to
-
SERVER-79175 Improve AutoStatsTracker usage in distinct and find commands
- Closed