Distributed Deadlock Detection and Wait-for-Graph Scaling Limits
23K reputation · 13 Mar 2021, 23:13 UTC
YugabyteDB employs a distributed deadlock detection mechanism utilizing a Wait-for-Graph (WFG) to identify cyclic dependencies across transactions. While the system integrates priority schemes like Wound-Wait to prevent certain deadlock scenarios, complex distributed transactions involving multiple tablets still rely on the WFG to resolve circular blocks.
In environments with high transaction concurrency and deep dependency chains, there is uncertainty regarding the resource overhead and latency associated with maintaining and traversing the WFG across distributed nodes. Specifically, it is unclear how the system manages the trade-off between the frequency of deadlock detection cycles and the resulting impact on transaction throughput when contention is widespread.
- What are the configurable limits or thresholds that trigger the distributed deadlock detection process?
- How does the system prevent the Wait-for-Graph itself from becoming a performance bottleneck during high-contention bursts?