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

Limit redlock to versions < 2.0, as these cause sidekiq jobs to fail #5961

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

bbpennel
Copy link
Contributor

After bringing up my dassie vm today, post ingest jobs to add files to works no longer succeeded. I ran into the same problem with main and hyrax 3.5.0. @dlpierce suggested it might be related to the just released version of redlock, which appears to have been the case. So this PR locks the version at < 2.0.0

ERROR -- : [ActiveJob] [AttachFilesToWorkJob] [79e40862-dc38-4f32-b816-3a2dc7450523] Error performing AttachFilesToWorkJob (Job ID: 79e40862-dc38-4f32-b816-3a2dc7450523) from Sidekiq(default) in 72483.02ms: Redis::CommandError (NOSCRIPT No matching script. Please use EVAL.):

hyrax-sidekiq-1     | /usr/local/bundle/gems/redis-4.8.0/lib/redis/client.rb:162:in `call'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redis-4.8.0/lib/redis.rb:270:in `block in send_command'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redis-4.8.0/lib/redis.rb:269:in `synchronize'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redis-4.8.0/lib/redis.rb:269:in `send_command'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redis-4.8.0/lib/redis/commands.rb:206:in `call'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redis-namespace-1.10.0/lib/redis/namespace.rb:558:in `wrapped_send'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redis-namespace-1.10.0/lib/redis/namespace.rb:410:in `method_missing'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:171:in `block in lock'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:210:in `recover_from_script_flush'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:170:in `lock'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:260:in `block (2 levels) in lock_instances'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:260:in `select'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:260:in `block in lock_instances'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:313:in `timed'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:259:in `lock_instances'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:234:in `block in try_lock_instances'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:230:in `times'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:230:in `try_lock_instances'
hyrax-sidekiq-1     | /usr/local/bundle/gems/redlock-2.0.0/lib/redlock/client.rb:69:in `lock'
hyrax-sidekiq-1     | /app/samvera/hyrax-engine/app/services/hyrax/lock_manager.rb:20:in `lock'
hyrax-sidekiq-1     | /app/samvera/hyrax-engine/app/services/hyrax/lockable.rb:7:in `acquire_lock_for'
hyrax-sidekiq-1     | /app/samvera/hyrax-engine/app/actors/hyrax/actors/file_set_actor.rb:71:in `attach_to_work'
hyrax-sidekiq-1     | /app/samvera/hyrax-engine/app/jobs/attach_files_to_work_job.rb:40:in `attach_work'
hyrax-sidekiq-1     | /app/samvera/hyrax-engine/app/jobs/attach_files_to_work_job.rb:28:in `block in perform_af'
hyrax-sidekiq-1     | /app/samvera/hyrax-engine/app/jobs/attach_files_to_work_job.rb:26:in `each'
hyrax-sidekiq-1     | /app/samvera/hyrax-engine/app/jobs/attach_files_to_work_job.rb:26:in `perform_af'
hyrax-sidekiq-1     | /app/samvera/hyrax-engine/app/jobs/attach_files_to_work_job.rb:11:in `perform'

@samvera/hyrax-code-reviewers

Copy link
Contributor

@dlpierce dlpierce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks like the adoption of RedisClient is the breaking change here. Here's the diff between these redlock versions.

@dlpierce dlpierce merged commit 53f90d8 into samvera:main Feb 10, 2023
@bbpennel bbpennel deleted the redlock-version branch February 10, 2023 21:57
laritakr added a commit to samvera/hyku that referenced this pull request Feb 11, 2023
* Add iiif_print configuration to Image without PDF splitting.
* Updates to Bulkrax 5 to support remote URLs.
* Locks gem redlock due to reported error. See samvera/hyrax#5961
@dlpierce dlpierce added the notes-bugfix Release Notes: Fixed a bug label Mar 30, 2023
dlpierce added a commit that referenced this pull request May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notes-bugfix Release Notes: Fixed a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants