-
1 commits to main since this tag
A released lock could come back as a ghost.
Lock::unlocksignalled the
background hold task and sent UnLock immediately; if the task had an
idempotent re-acquire RPC in flight,race_stopdropped the future
client-side but the server kept processing it — once UnLock had removed
the original lease, the same request_id re-WON the key with a fresh id
that no client held. On graylin prod that ghost writer sat on
shutdown:pod:<id>:barrier(created ~1 ms after "released :barrier
writer", then "lease_ttl pq has a removed node" and never reaped) and
parked every proxied request on the pod for the full 120 s restart wait.- hold_loop no longer races the acquire RPC against stop; it lets the
RPC finish (bounded by HOLD_RPC_TIMEOUT), then honours a level
stoppedflag and releases any lease it won while stopping. - unlock() sets
stopped, notifies, JOINS the hold task (abort only as
a backstop past every bound), then UnLocks the current id. - Drop sets the flag and notifies but no longer aborts mid-RPC.
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01MCwe5Sf5NU8Ei13oqTcesjDownloads
- hold_loop no longer races the acquire RPC against stop; it lets the