Walk blocking chains
walk_blocking_chainsWalk the lock-wait graph to detect deadlock cycles and trace blocking chains to root blockers, producing a Mermaid flowchart for visualization.
Instructions
Walk and reconstruct the lock-wait graph of the database. Detects deadlock cycles, traces linear blocking paths to their root blockers, and renders a Mermaid flowchart representing the lock dependency graph. Read-only. Returns an object with cycles (list of detected cycle PID lists), paths (linear blocking paths as PID lists), roots (root blocker PIDs), nodes (dict keyed by PID with per-backend lock detail), and mermaid (the pre-rendered flowchart string).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| database | No | Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | ||
| paths | Yes | ||
| roots | Yes | ||
| cycles | Yes | ||
| mermaid | Yes |