-
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
Support Redis >= 6.2.7 (Lua readonly global tables) #268
Comments
cc @thomasst , any thoughts on this? 😄 |
I have not played around with Redis 7 but that looks good. The way we're doing it currently is a hack. |
``Hi, Code that create problem for us is :
And we solved it by creating our own function (no so good... but it works)
|
On redis >= 6.2.7 we currently encounter an "Attempt to modify a readonly table" error (more info here)
This error is introduced by redis/redis#10651 which hardened Lua script execution by not allowing modifications of global tables and is affecting Redis versions >= 6.2.7.
It happens because when trying to execute a pipeline using the
execute_pipeline
Lua script, we try to set theKEYS
andARGV
global variables before calling another script usingEVALSHA
.Executing pipelines via a Lua script was introduced because Redis transactions don't abort execution of commands when one of the commands in the transaction fails.
The fix would probably be to use Redis functions for Redis 7.0 and above, because they're directly callable by providing
keys
andargv
in the call itself usingFCALL <func_name> <keys> <argv>
The text was updated successfully, but these errors were encountered: