-
Notifications
You must be signed in to change notification settings - Fork 80
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
Error: "No matching script. Please use EVAL." #124
Comments
@zarqman We have this same issue with 2.0.0 and 2.0.1 even though we're using redis 5.0.6.
The code in question (works fine with 1.3.2):
…now causes:
|
Which version of Redis (the database, not the gem) are you using, @jarkko? I saw that error, before upgrading to at least v6. |
6.2.5 |
FWIW, bumping to 7.0.8 made no difference. I guess the issue is somehow related to the switch from Redis to RedisClient in Redlock. Our own client above ( |
Yes, that's the other thing I had to change. You cannot use anything like |
I tried to warn about this fact in the readme, let me know what you guys think about it? |
I am not sure there's much more you can do. Maybe you could add it to the 2.0.0 release description? Then dependabot will most likely pick it up and people will directly see it. You could try catching that error and reraise it with a message that mentions that it requires Redis 6, but that seems pretty brittle and might now be worth it. |
@leandromoreira, the updated readme is definitely a help! 👏 I'd suggest a couple of additional things:
For additional background, the apps I work on have historically reused an existing redis (gem) client instance (instantiated with I appreciate everyone's effort in making Redlock the best as it can be. Thanks for your generosity! |
One simple addition to @zarqman's notes would be to add a changelog file. It would be trivial to spot the changes from there , whereas you don't necessarily read through the Readme every time you bump the version of a gem. Dependabot can also automatically show the changes from a changelog. In our context, we're using some more advanced functionality of the redis gem that the pure redis-client does not support, so switching the client would be a bit of a refactoring. In any case, looking at the changes between 1.3.2 and 2.0, there doesn't seem to be much we would benefit from anyway, so that's fine. Anyway, thanks for your hard work on Redlock. Much appreciated! |
Unfortunately, some Redis-related gems have to be locked. There's something funky going on with Redlock: leandromoreira/redlock-rb#124 Gem updating is already stressfull enough without this kind of garbage. And when something related to Redis breaks, I take no chances. I'll play it safe and lock all Redis-related gems. I will unlock them one by one and fix errors. But that will come later.
Hi there. It seems, if we want to reuse an existing Redis gem REDIS = ConnectionPool::Wrapper.new do
Redis.new(url: ENV['REDIS_URL'])
end and get a backward compatibility, we should catch all the errors here redlock-rb/lib/redlock/client.rb Line 217 in fc3c5b1
NOSCRIPT in the message because with the Redis gem we get Redis::CommandError , not the RedisClient::CommandError
|
Just ran into this upgrading to the latest Basically, I found I had to do what this guy was saying: #135 (comment) It wasn't totally clear to me reading https://github.com/leandromoreira/redlock-rb#redis-client-configuration
That I was no longer fine passing in |
It seems that
redlock
v2.0.0 is possibly broken when used withredis
4.8.1 (the redis gem, not redis-server).When attempting to lock, I'm getting "Redis::CommandError: NOSCRIPT No matching script. Please use EVAL."
Full exception
Does redlock need to require
'redis', '>= 5.0.0'
?(If so, redlock 2.0.0 might need to be yanked to avoid breaking apps currently using redis gem < 5.)
Using redlock 1.3.2 works correctly.
Versions
redis-server 6.2.10
redlock
2.0.0redis
(gem) 4.8.1rails
7.0.4.2The text was updated successfully, but these errors were encountered: