-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Storage Execution
-
Fully Compatible
-
v8.0
-
Execution Team 2024-05-13
-
200
There are several inefficiencies in the AutoStatsTracker:
The AutoStatsTracker computes the operation latency on destruction, which happens before CurOp::completeAndLogOp is called, which also reads the clock. This means we're reading the clock one more time than necessary to observe the same information. This also means the AutoStatsTracker, which records opLatencies, is reporting a different value than is reported in the slow query logs.This is a massive refactor- The AutoStatsTracker reads the global CollectionCatalog before the collection acquisition, which is costly.