码迷,mamicode.com
首页 > 其他好文 > 详细

Why failover-based implementations are not enough

时间:2020-06-01 13:33:43      阅读:58      评论:0      收藏:0      [点我收藏+]

标签:ready   https   why   lov   crash   master   stl   not   failover   

Distributed locks with Redis – Redis https://redis.io/topics/distlock

There is an obvious race condition with this model:

  1. Client A acquires the lock in the master.
  2. The master crashes before the write to the key is transmitted to the slave.
  3. The slave gets promoted to master.
  4. Client B acquires the lock to the same resource A already holds a lock for. SAFETY VIOLATION!

 

Why failover-based implementations are not enough

标签:ready   https   why   lov   crash   master   stl   not   failover   

原文地址:https://www.cnblogs.com/yuanjiangw/p/12987229.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!