Code RoomDeadlock on wallet transfers
MediumPrep Room Coding #2595

Deadlock on wallet transfers

On-callConcurrencyMid–Senior~30 min

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.

0:00 of about 30 min
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.