Add dhandle close and sweep wait-time statistics

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sweep Server
    • Storage Engines - Foundations
    • 474.973
    • None
    • None

      Issue Summary

      Add production statistics that identify which phase of dhandle closing blocks the sweep server and delays checkpoint handle gathering.

      Individual eviction operations may be short while sweep can still wait for an eviction-exclusive window, close lock, checkpoint close, btree close, or discard phase. Existing aggregate statistics do not distinguish these wait points or expose the maximum duration of a blocked close.

      Context

      • The sweep server can block while closing an idle dhandle.
      • Checkpoint handle gathering can be delayed while sweep waits for dhandle-related locks or eviction exclusivity.
      • A long individual eviction is not required: continuous short evictions can prevent the eviction subsystem from reaching a quiescent state.
      • Statistics must be aggregate and suitable for FTDC; per-URI statistics are not required.

      Proposed Solution

      Add connection statistics for the sweep/dhandle-close path, including:

      • Number of close attempts, successful closes, busy/skipped closes, and close failures.
      • Total and maximum wait time for dhandle write-lock acquisition.
      • Total and maximum wait time for close-lock acquisition.
      • Total and maximum wait time for eviction exclusivity, separately from individual eviction duration.
      • Total and maximum time spent in checkpoint-close, btree-close, and discard phases.
      • A way to distinguish a close blocked by sustained eviction activity from a single long eviction operation.

      Instrument the existing close path without changing locking or cancellation semantics. Regenerate the statistics headers/support files and document the new statistics for use in production diagnostics and FTDC analysis.

      Definition of Done

      • New statistics are documented in the WT statistics definitions and exposed through the normal connection statistics cursor.
      • Sweep/dhandle close instrumentation records aggregate totals and maxima for the relevant wait/close phases.
      • The statistics distinguish eviction exclusivity wait from individual eviction duration.
      • Existing checkpoint, sweep, and eviction tests pass.

            Assignee:
            [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            Haribabu Kommi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: