Code Room
On-callMediumoc-g234
Subject Lock contentionLevel Mid–Senior~30 minCommon in Concurrency interviewsIndustries Technology, Software development

Question

MySQL/InnoDB. After a feature deploy enabling a new 'transfer between two wallets' endpoint, error logs fill with `Deadlock found when trying to get lock; try restarting transaction` during peak traffic. It only happens when two transfers involve the same pair of wallets in opposite directions. Throughput is fine otherwise; the endpoint occasionally 500s. Triage, mitigate, and give the correct durable fix.

What a strong answer looks like

Stop the bleeding first (mitigate), then form hypotheses from real signals. Separate root cause from symptom, communicate status as you go, and close with what prevents a repeat.

Diagram & narrate the incident
Loading whiteboard…
Run or narrate your approach, then ask the coach.