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

Question: where do orphaned locks come from? #592

Closed
egiurleo opened this issue Apr 7, 2021 · 2 comments
Closed

Question: where do orphaned locks come from? #592

egiurleo opened this issue Apr 7, 2021 · 2 comments

Comments

@egiurleo
Copy link

egiurleo commented Apr 7, 2021

Hello! This isn't a feature request or a bug fix, just a question:

The documentation mentions cleaning up orphaned locks with the reaper. Can you explain how locks get orphaned? Why is it necessary to have a reaper at all?

I'm also happy to make a pull request to add this to the documentation once I understand it. Thank you for this awesome gem!

@mhenrixon
Copy link
Owner

Hi @egiurleo,

Thank you for the question! It is a very valid question. Historically, I've taken a pretty hard stance on enforcing uniqueness. The reason for this being that I feel like that's what this gem should really be about.

Other gems like sidekiq enterprise and some open source versions are too lenient on expiring jobs.

There are situations that would allow a job (and corresponding lock) to reach a state when I cannot check if the job is still processed or on the queue (when sidekiq is killed with SIGKIL for example). 

Also when allowing concurrent locks the last one would otherwise not be cleared.

Version 6 was a disaster that left many locks without a way to find and remove the orphaned ones. That was primarily the problem I wanted to solve with V7.

I have a few blog posts on the topic that I haven't posted anywhere yet.

@egiurleo
Copy link
Author

egiurleo commented Apr 7, 2021

@mhenrixon Thanks for the clarification! I'd be interested in reading those blog posts if you ever post them anywhere. Thank you again for all your hard work.

@egiurleo egiurleo closed this as completed Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants