What is distributed Atomic lock in caches drivers?

僤鯓⒐⒋嵵緔 提交于 2020-02-25 13:42:07

问题


I just want to know what is distributed Atomic lock means in caches drivers?


回答1:


Distributed locks are well documented, in multiple sources.

The atomic attribute refers to the indivisible test-and-set that should be part of the lock request. Otherwise, two contenders may test at the same time, and then both set and walk away thinking they got exclusivity on the resource.

Since it is a must, you often find the term simply as distributed lock.

Now, some sources:

  • Antirez (Redis creator) criticized must client implementations while making a good analysis of the challenges of a distributed lock. He called his solution Redlock. Distributed locks with Redis
  • Then Martin Kleppmann, author of Designing Data-Intensive Applications, criticized Redlock and proposed his solution in How to do distributed locking
  • Then Antirez replied, in Is Redlock safe?

Going through these three articles will give you a strong sense of how to implement a distributed lock.



来源:https://stackoverflow.com/questions/55075942/what-is-distributed-atomic-lock-in-caches-drivers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!