-
Notifications
You must be signed in to change notification settings - Fork 116
Question: how do you keep the lock #17
Comments
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. |
I indeed read article. A longer ttl will not fit for a process willing to Le ven. 18 mars 2016 18:52, Paul DeCoursey [email protected] a
|
@osallou Actually, |
Once A has acquired the lock, set with a timeout of 10 seconds for example.
How can A keep the lock, within the 10 seconds, to prevent B to take it?
I see no method to renew the lock.
I expect A to keep the lock as long as necessary, then B takes it only if A fails (and ttl will remove the lock) or A releases the lock.
Thanks
The text was updated successfully, but these errors were encountered: