-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Description
It has recently come to my attention a text in both the new FUNCTION command as well as in the older EVAL (from https://redis.io/commands/eval) command that states this
The script should only access keys whose names are given as input arguments. Scripts should never access keys
with programmatically-generated names or based on the contents of data structures stored in the database.
I am pretty sure this has been a recommendation before and not a "should never", specially in a standalone scenario or if using "hash tags" in a clustered environment (https://redis.io/topics/cluster-tutorial).
Now, we have been generating keys inside lua scripts for a decade in Bull (https://github.com/optimalbits/bull) and BullMQ(https://github.com/taskforcesh/bullmq) without any issues. Thousands of companies depends on these libraries to work reliable every day so this change in the text has worried me. I suspect this has to do with the most strict rules you are enforcing on the new FUNCTION since the documentation changes comes from this PR: redis/redis-doc#1725
So please, could you clarify this change in the requirements of EVAL and if this is going to break future deployments of Bull/BullMQ as new versions of Redis are released?