Redis script with SMEMBERS call should return empty if key doesn't exist #4371
-
Describe the bug To Reproduce
Expected behavior Screenshots Environment (please complete the following information):
Reproducible Code Snippet
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
what's the error you are getting? |
Beta Was this translation helpful? Give feedback.
-
I got an error like this: |
Beta Was this translation helpful? Give feedback.
-
You should pre-declare the keys, see https://www.dragonflydb.io/docs/command-reference/generic/eval#syntax for more details. |
Beta Was this translation helpful? Give feedback.
-
Please let me know if you have any more questions. There is more material around lua transactions in dragonfly. |
Beta Was this translation helpful? Give feedback.
Please let me know if you have any more questions. There is more material around lua transactions in dragonfly.
See also https://www.dragonflydb.io/docs/managing-dragonfly/scripting . Passing
--default_lua_flags=allow-undeclared-keys
solves the issue but is unadvised because it hinders perfomance of Dragonfly around lua calls.