-
-
Notifications
You must be signed in to change notification settings - Fork 276
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
V7 Beta 15 on_conflict:
with Hash does not work on server
#499
Comments
I recommend you upgrade to v7.0.16. It was fixed there |
Thank you for the quick response! I don't see a release for 7.0.16. I tried against master and I'm still able to reproduce my issue. My reproduction steps are: Worker class: class TestJob
include Sidekiq::Worker
sidekiq_options lock: :until_and_while_executing, on_conflict: { client: :log, server: :reschedule }
def perform(i)
sleep 1
puts "\n ----- #{i} -----\n"
end
end Start up multiple sidekiq servers. I have been running 4. For my client, I boot up a rails console and run the following: rand = Random.new
while true do
i = rand.rand(100)
puts "Queueing #{i}"
3.times { Sidekiq::Client.enqueue(TestJob, i) }
sleep 0.1
3.times { Sidekiq::Client.enqueue(TestJob, i) }
while Sidekiq::Queue.new.size > 0 do
print "."
sleep 1
end
puts "Done #{i}"
end The client is solid, it works as expected when there's a conflict. If there's a conflict on the server side, it fails instead of rescheduling the job. I think the issue is that on the server side, the Thanks again for your help! |
Ok, I see you point, the solution is much simpler than I thought. Will try to create a new release today. |
Thanks! I've been running in production with #500 for the past few days and it has been working well. I'll switch to the latest release whenever you're able to create it. |
Released as |
Thank you for the release. Unfortunately the release broke client locking for me, as the |
Describe the bug
Version 7 Beta 15 does not work on the server side only when given a Hash for
on_conflict:
. Server crashes when a conflict is detected.Expected behavior
Conflict strategy is executed on the server when a conflict is detected.
Current behavior
Job crashes with stacktrace:
Worker class
Additional context
I'm using Sidekiq 5.2.8. I believe the issue is that job hash is completed stringified on Sidekiq pulls it from Redis, and
on_server_conflict
is expecting symbols for keys in the hash.The text was updated successfully, but these errors were encountered: