-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicated tokens when using timeouts #10
Comments
This can be reproduced with a much simpler case. In client 1:
In client 2:
Wait 10 seconds, then start client 3:
Now press Enter in client 1. It will push an extra token to the list. Your semaphore's value has now changed from 1 to 2. There should be some kind of way for |
Anyone? |
I just had a lot of fun with this particular failure case - it definitely reinforces the need to make sure your timeout is longer than expected runtime. I would enjoy writing a solution to this, but the question to @dv is whether the added complexity is really worth it (i.e. would get merged in). |
There's a situation in which it's possible that tokens get pushed on the available list twice, when using stale client timeouts.
The
release_stale_locks
method can take quite a bit of time. In the case where a token has timed out, but the original locking process is actually still running, if therelease_stale_locks
method is being run while the original locking process finishes, both the original process and therelease_stale_locks
method will push the token on the available list.The text was updated successfully, but these errors were encountered: