-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
upgrade_v6_lock : ERR wrong number of arguments for 'hmset' command #591
Comments
Hi @Axxiss! Sorry about the trouble, the upgrade procedure can be extremely slow in some cases when there are a lot of locks. I see no reason for this error as I have tests for newer versions of What I am about to write is hypothetical so please don't take it with a grain of salt: I think that you could basically delete all the locks in your system for the sole reason that the locks would be created each time a job is picked up. What I mean is that no matter which lock type you have, the procedure would lock from where it is. Meaning, if your job is on the queue, awaiting a worker to pick it up; it would create the lock as the server starts processing it. You could potentially run into some weird situations if some lock is pushed or delayed before the worker picks up the job but in that case, an error should be raised and the job retried. If you have no locks to upgrade, the server should start pretty fast. The alternative would be to run the upgrader manually before starting the sidekiq server Just let me know how you'd prefer to proceed and I can help you with the details. |
Hi @mhenrixon thanks for the quick reply, much appreciated! 😄
Yeah, something like that is what I have in mind. If it's possible to know the age of a lock, delete the oldest ones. Something like "delete everything older than a week". In case that's not possible, probably deleting all locks and starting from a clean state would be ideal. This are the locks we are currently using
|
@Axxiss, unfortunately, v6 doesn't keep track of anything in regards to timestamps. The best you can do is delete all locks and start everything up (including the reaper). The reaper should remove locks that end up in a weird state, and eventually, everything should be working fine again. The I am 9x% certain that apart from a very few potential issues, that hopefully go away on its own. It should be fairly safe. |
One last thing @mhenrixon I assume that it's safe to delete all keys matching |
@Axxiss, that would be the pattern that I'd use and that's the reason for the prefix. |
After deleting all locks and deploying latest version error is gone. Thank you! |
Describe the bug
Immediately after upgrade from
6.0.20
to7.0.7
I started seeing the following errorERR wrong number of arguments for 'hmset' command
. Unfortunately had to rollback as we have a big amount of old locks.Expected behavior
Upgrade v6 locks converts v6 locks into v7 format.
Current behavior
Upgrade v6 locks throws
ERR wrong number of arguments for 'hmset' command
(stacktrace at the bottom)Worker class
The error is not happening in any specific worker. It comes from the v6 upgrade lock procedure.
Bonus questions
Is there any safe way to remove old locks through rails console/small script? That would allow us to get rid of old stuff so we can move forward with the gem upgrade.
Additional context
scan 'uniquejobs:*'
is about 2MStacktrace
The text was updated successfully, but these errors were encountered: