2 days ago
- Martin Kleppmann's analysis claims Redlock is unsafe due to lack of fencing tokens and unrealistic timing assumptions.
- The author disagrees, arguing that fencing tokens require a linearizable store and are unnecessary if unique tokens are used for check-and-set.
- Redlock's time checks before and after lock acquisition prevent network delays or pauses from causing safety violations during acquisition.
- Clock jumps can be mitigated by using monotonic time APIs, which the author plans to implement.
- The author concludes that Redlock is safe under reasonable assumptions and that Martin's analysis does not justify avoiding it.