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

Version 5: Job ID Hash Entries Not Removed if Unique Key Expires #346

Closed
chadrschroeder opened this issue Nov 13, 2018 · 1 comment
Closed
Assignees

Comments

@chadrschroeder
Copy link

chadrschroeder commented Nov 13, 2018

Job ID entries in the uniquejobs hash are not removed if the job is picked up after the unique_expiration time has passed.

To recreate the issue:

  1. Stop Sidekiq.
  2. Set up a worker with a test expiration that is verify small like unique_expiration: 10.seconds.
  3. Submit a job. This will produce a uniquejobs:85d... key and an entry in the uniquejobs hash.
  4. Wait 10 seconds for the uniquejobs:85d... key to expire.
  5. Start Sidekiq.

At this point the job run, but the jid entry will be left in the uniquejobs hash.

The problem appears to have been introduced in this commit which refactored unlock_by_key in a way so that ensure_job_id_removed was no longer always called.

I see you have this commit which also solves the issue by completely removing the uniquejobs hash, but it isn't released yet. I'm going to submit a PR with a single-object change if you'd be interested in releasing this change as 5.0.11.

@mhenrixon
Copy link
Owner

Released as v5.0.11

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

No branches or pull requests

2 participants