Debugging Distributed Locks
A checklist for stale locks, duplicate workers, TTL drift, and clock-skew ownership bugs.
Pattern
Exclusive work depends on lock ownership, but expiry, cleanup, or time source assumptions break ownership.
warningSymptoms
- arrow_rightSame job runs twice
- arrow_rightRetry remains blocked after failure
- arrow_rightDifferent workers disagree about lock expiry
searchWhere to look
- arrow_rightLock acquire/release paths
- arrow_rightOwner tokens
- arrow_rightTTL and heartbeat settings
- arrow_rightClock source
buildCommon fixes
- arrow_rightRelease locks in finally paths
- arrow_rightUse owner tokens for release
- arrow_rightAlign visibility timeout and lock TTL
- arrow_rightUse server-side TTL
Practice challenges
No ready practice incident is mapped yet.