Tagged articles

Fencing Token

2 articles · Page 1 of 1
Programmer XiaoFu
Programmer XiaoFu
Mar 3, 2026 · Backend Development

Why Can a Redis Lock Be Stealed by Another Thread Before Its TTL Expires?

In high‑concurrency Java services, a Redis lock that appears to have a valid TTL can still be taken by another thread when a long Stop‑The‑World pause freezes the JVM clock, causing the lock to expire on Redis while the original holder remains paused, leading to data races.

Distributed LockFencing TokenJVM
0 likes · 8 min read
Why Can a Redis Lock Be Stealed by Another Thread Before Its TTL Expires?
dbaplus Community
dbaplus Community
Mar 16, 2017 · Backend Development

Redlock vs Antirez: A Deep Dive into Distributed Lock Safety and Fencing Tokens

This article revisits the Redlock debate by examining Antirez's rebuttal to Martin Kleppmann, analyzing Hacker News discussions, comparing Redis, ZooKeeper, and Chubby lock implementations, and exploring timing assumptions, clock skew, and fencing token mechanisms to assess distributed lock safety.

ChubbyDistributed LocksFencing Token
0 likes · 32 min read
Redlock vs Antirez: A Deep Dive into Distributed Lock Safety and Fencing Tokens