Comments (3)
@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.
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.
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)
- Add a license HOT 1
- Should raise `ValueError` and be more specific about exceptions in `def lock_instance` HOT 2
- Possible to check on lock status? HOT 1
- Fails with non-default setting of redis HOT 1
- Lock method does not work HOT 2
- Redis Cluster HOT 2
- retry_count = 0 or retry_delay = 0 not works, may be a bug?
- Add context manager support HOT 4
- Add watching dog to extend TTL HOT 4
- NameError: name 'basestring' is not defined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redlock-py.