Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-3254

Investigate changes in SERVER-73571: CurOp::_lockStatsBase is never set

    • Type: Icon: Investigation Investigation
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Original Downstream Change Summary

      "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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: