首页 > 其他 > 详细

Why failover-based implementations are not enough

时间:2020-06-01 14:05:23      阅读:47      评论:0      收藏:0      [点我收藏+]

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!