-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mysql deadlocks while reserving jobs
- We frequently see deadlock errors when using mysql and a large number of workers - This PR adds a fix for the deadlocks as well as modifying a test to exposes the deadlock issue in the previous implementation - This implementation is based on the `reserve` implementation from the default active_record backend: https://github.com/collectiveidea/delayed_job_active_record/blob/42a68ed79917e14244a25a0a77fef0924bef3e97/lib/delayed/backend/active_record.rb#L64 - You can see the original error by pulling in the new test and running: `DEBUG=true DB=mysql bundle exec rspec spec/delayed/backend/sequel_spec.rb:27`
- Loading branch information
1 parent
9ce5c2f
commit 4fa95cb
Showing
2 changed files
with
27 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters