kevy4.0

EVAL

Run a Lua script server-side; routed to KEYS[1]'s shard when numkeys >= 1.

EVAL script numkeys [key [key ...]] [arg [arg ...]]
Group
Scripting
Since
1.0.0
Arity
at least 3
Flags
write

Complexity

O(compile + the script's own work). The whole script is one atomic unit on KEYS[1]'s shard and blocks that shard for its duration. The runaway guard is an INSTRUCTION budget (lua time_limit_ms x 40000 instructions), not a wall clock

Complexity and compatibility are read out of kevy's implementation, not copied from Redis's reference. Several genuinely differ.

Redis compatibility

Differs

there is no -BUSY state and no SCRIPT KILL — an over-budget script is aborted in place and answered with an ordinary error; nested EVAL is rejected, a redis.call touching another shard's key returns CROSSSLOT, and EVAL auto-caches its source by SHA1 so EVALSHA works without SCRIPT LOAD

See also

EVALSHASCRIPT

← All commands