# Distributed Lock — Manual Review Checklist ## Timeout Strategy - [ ] Lock TTL defined and justified (not arbitrary) - [ ] TTL exceeds maximum expected operation time - [ ] Watchdog/refresh mechanism if operation may exceed TTL - [ ] Lock auto-releases on process crash (not permanent deadlock) ## Release Mechanism - [ ] Lock released by the same instance that acquired it (ownership check) - [ ] Release is atomic (check-then-release is not atomic — use Lua script or compare-and-delete) - [ ] Lock release in finally/defer block guaranteed to execute ## Retry Strategy - [ ] Retry with exponential backoff, not infinite retry - [ ] Maximum retry count or timeout defined - [ ] Failed lock acquisition returns clear error (not silent fallback) ## Granularity & Deadlock - [ ] Lock key granularity appropriate (per-resource, not global) - [ ] Multiple lock acquisition order consistent (prevents deadlock) - [ ] No nested locks on same resource - [ ] Lock contention monitored/metrics available