Closed howz97 closed 1 month ago
It doesn't matter if the key exists or not, it needs to be added to the EVAL command or specific script options should be used #272
I tried append the key to EVAL, while it return (nil) . Is this a bug? @dranikpg
127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> get foo
"bar"
127.0.0.1:6379> eval "redis.call('GET', KEYS[1])" 1 foo
(nil)
127.0.0.1:6379>
@howz97 you should write : eval "return redis.call('GET', KEYS[1])" 1 foo
note the "return"
Describe the bug Got "script tried accessing undeclared key" when key actually exists
To Reproduce install drongonfly
execute
Expected behavior eval should succeed
Environment (please complete the following information):
OS: [ubuntu 20.04]
Kernel:
Linux ip-172-31-40-58 5.15.0-1058-aws #64~20.04.1-Ubuntu SMP Tue Apr 9 11:11:55 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
Containerized?: Docker
Dragonfly Version: [e.g. 0.3.0]
Reproducible Code Snippet
Additional context Add any other context about the problem here.