Skip to content
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

Timed-out lock never released #61

Closed
trowski opened this issue Oct 15, 2019 · 2 comments · Fixed by #62
Closed

Timed-out lock never released #61

trowski opened this issue Oct 15, 2019 · 2 comments · Fixed by #62
Labels

Comments

@trowski
Copy link
Member

trowski commented Oct 15, 2019

If obtaining a lock in fails due to timeout, it appears the lock cannot be obtained again by another request. Guessing this is because the token remains in the queue, but is not removed?

@kelunik kelunik added the bug label Oct 15, 2019
@kelunik
Copy link
Member

kelunik commented Oct 15, 2019

It will eventually be moved due to

local queued = redis.call("lpop", queue)
redis.call("set", lock, queued, "px", ttl)
, but is then an unused lock and just expires after the lock time. The implementation should clean up the token from the queue instead.

@trowski
Copy link
Member Author

trowski commented Oct 17, 2019

The session did not appear to automatically unlock. It was still locked after several minutes, rather than only a few seconds. I did not change any of the default options. I had to manually remove the key to unlock the session.

The implementation should clean up the token from the queue instead.

Yes, then the first issue would also be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants