-
Notifications
You must be signed in to change notification settings - Fork 342
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
Semaphore locks can't release #231
Comments
Hi! Just ran into this problem in my application. Did you find the solution? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/gocraft/work/blob/master/redis.go#L109
Take a look at how the LUA script increases the lock key. I think we should apply another mechanism for semaphore lock. It is unsafe for the current mechanism, somehow the release lock step can't be executed (https://github.com/gocraft/work/blob/master/worker.go#L267) due to connections to Redis.
In general, it should have an expired time when using the lock key.
https://redis.com/ebook/part-2-core-concepts/chapter-6-application-components-in-redis/6-3-counting-semaphores/
The text was updated successfully, but these errors were encountered: