-
Type: Investigation
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
"sub-operations" will once again no longer double-count the locking statistics of their parent operation(s). This change surfaces in the profiler and currentOp output for sub-operations. This bug was originally fixed in 4.2, but resurfaced again in 5.0.
There aren't many cases where sub-operations are reported in currentOp or the profiler output, but one example would be when an individual delete command includes multiple different deletes in the deletes array. Prior to this change, each delete would inherit the locking statistics of the parent operation, even if those lock stats weren't associated with that delete. Some additional information can be found in the original bug fix (SERVER-26854), though the repro included in that ticket no longer works.
Description of Linked Ticket
Each CurOp is meant to store a snapshot of its opCtx's lock stats taken at the time of the CurOp's creation. These snapshots would then be used when retrieving the stats for a given sub-operation to subtract out any stats recorded by its super-operations.
However, the snapshots are never actually being taken and stored properly, so this subtraction is never occurring. As a result, all sub-operations report lock acquisition stats made by their super-operations.
- depends on
-
SERVER-73571 CurOp::_lockStatsBase is never set
- Closed