Giter Site home page Giter Site logo

Comments (3)

xq5he avatar xq5he commented on June 27, 2024 1

@osallou Actually, set will return null if the key has been set. So this check will be Flase if the resource has been locked by other client.

from redlock-py.

optimuspaul avatar optimuspaul commented on June 27, 2024

That does sound like a good feature request. My advice for now would be obtain locks with timeouts much longer than you expect you'd need.

I don't know if you'd read this, http://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html, but a lot of concerns about the safety of redlock have been brought up. I personally like the simplicity of redlock and in my use only use it for advice and not as a guarantee.

There is always the possibility that A fails to complete it's task before the timeout occurs, which is why you would never want to use redlock in a critical scenario unless you were also using a CAS of some sort to deal with conflict.

from redlock-py.

osallou avatar osallou commented on June 27, 2024

I indeed read article. A longer ttl will not fit for a process willing to
keep forever until stopped, released or crashed.
The random value obtained with the lock could be used certainly to allow an
expiration update only if value match, just like for releasing it.

Le ven. 18 mars 2016 18:52, Paul DeCoursey [email protected] a
Γ©crit :

That does sound like a good feature request. My advice for now would be
obtain locks with timeouts much longer than you expect you'd need.

I don't know if you'd read this,
http://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html,
but a lot of concerns about the safety of redlock have been brought up. I
personally like the simplicity of redlock and in my use only use it for
advice and not as a guarantee.

There is always the possibility that A fails to complete it's task before
the timeout occurs, which is why you would never want to use redlock in a
critical scenario unless you were also using a CAS of some sort to deal
with conflict.

β€”
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#17 (comment)

from redlock-py.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.