PulseAugur
EN
LIVE 20:53:35

Developer uses LLM to replace database deadlock victim selection

A developer has created a sidecar process called DDA that replaces traditional database deadlock victim selection with an LLM. DDA polls lock states, builds a wait-for graph, and then queries an LLM, specifically DeepSeek V4-Pro via the Anthropic SDK, to choose which transaction to roll back. While LLM latency is a significant trade-off compared to microsecond-level fixed rules, DDA successfully resolved all tested deadlock scenarios and demonstrated more nuanced reasoning than fixed rules by considering lock types and admitting when transactions were symmetric. AI

IMPACT Demonstrates LLMs can offer more nuanced decision-making than fixed rules in specialized technical domains.

RANK_REASON Developer built a tool using an LLM to solve a specific database problem.

Read on dev.to — LLM tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

COVERAGE [1]

  1. dev.to — LLM tag TIER_1 English(EN) · maisonw ·

    Show HN: I replaced database deadlock victim selection with an LLM — here's the data

    <p>Every mainstream database uses fixed rules for deadlock victim selection.</p> <p>MySQL kills the one with the fewest locks. CockroachDB kills the youngest. PostgreSQL kills the one that closed the cycle. Not one of them can explain "why you" — the killed transaction just knows…