-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Closed
Description
Hi, according to the EVAL docs, if "a Redis command call will result into an error, redis.call() will raise a Lua error". But check this out:
redis> eval "redis.call('llen', nil)" 0
(nil)
Command returned ok. But the redis.call did return a lua error:
redis> eval "local res = redis.call('llen', nil) return res" 0
(error) Lua redis() command arguments must be strings or integers
I suppose I was expecting something similar to this to happen:
redis> eval "redis.call('llen')" 0
(error) ERR Error running script (call to f_6fb575faf03c0feac7654c95d6dd9d9de1e75144): Wrong number of args calling Redis command From Lua script
This seems to happen with any command:
redis> eval "redis.call('hset', 'foo', 'bar', nil)" 0
(nil)
Server info:
redis> INFO
# Server
redis_version:2.5.12
redis_git_sha1:00000000
redis_git_dirty:0
os:Linux 2.6.35.11-83.fc14.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.5.1
process_id:17376
run_id:97410b61ad74e0a2819a93bd03762717567059c6
tcp_port:8666
uptime_in_seconds:173406
uptime_in_days:2
lru_clock:409082
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels