Distributed Locks Are More Dangerous Than They Look

A distributed lock is not a bigger mutex A distributed lock is not a bigger mutex. It is a different animal wearing the same costume, and the costume is what gets people hurt. Distributed locks look deceptively similar to local mutexes. You acquire, you perform a critical operation, you release. That resemblance is dangerous. A local mutex lives inside one failure domain. A distributed lock spans processes and networks and clocks and storage, along with failure detectors that can disagree with each other. The lock service may correctly decide that ownership changed while the previous holder is still running or paused or partitioned, or while it is quietly carrying delayed requests. The
…