Skip to content
Tagged articles

stale writes

1 articles · Page 1 of 1
IT Architects Alliance
IT Architects Alliance
Oct 19, 2026 · Backend Development

GC Pauses Break Redis Locks: How Fencing Tokens Prevent Stale Overwrites

The article explains how Redis distributed locks with TTL leases fail to prevent stale writes when a garbage collection pause delays a lock holder past its lease expiry, allowing a new holder to write fresh data that the original holder then overwrites upon resuming; it demonstrates why fencing tokens — incrementing sequence numbers issued atomically with lock grants and checked atomically at the storage layer via conditional updates — are necessary to reject obsolete writes.

GC pausePostgreSQLRedlock
0 likes · 12 min read
GC Pauses Break Redis Locks: How Fencing Tokens Prevent Stale Overwrites