We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Got "script tried accessing undeclared key" when key actually exists
To Reproduce install drongonfly
docker run --network=host --ulimit memlock=-1 docker.dragonflydb.io/dragonflydb/dragonfly
execute
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', 'foo')" 0 (error) ERR Error running script (call to 77563f88f961d5772ea29fbc4a18558997365e67): @user_script:2: script tried accessing undeclared key
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
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
# Minimal code snippet to reproduce this bug
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
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
Sorry, something went wrong.
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"
eval "return redis.call('GET', KEYS[1])" 1 foo
No branches or pull requests
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.
The text was updated successfully, but these errors were encountered: