Definition
Wait-for Graph (ACID)
When a transaction requests a lock on a data item that is currently held by another transaction , must wait. The wait-for graph captures these dependencies using a directed graph.
- Nodes: Each node in the graph represents a single, active transaction in the system.
- Edges: A directed edge exists from transaction is currently waiting to acquire a resource that is held by transaction .
A deadlock exists if and only if the wait-for graph contains a cycle. To resolve the deadlock, rollback one or multiple involved transactions (e.g. the latest or the one holding the most locks).