LUA eval not recognizing key slot
Problem
I am using the cluster access capabilities of ioredis. Running scripts that SET data are working, but when trying to run a simple GET: "return redis.call('GET', 'foo')" the client is not able to recognize where the key "foo" is stored in the cluster. Is there a way to do this besides parsing CLUSTER SLOTS to find the keyslot for foo manually?
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: LUA eval not recognizing key slot
you cant really do that, you need to supply keys amount to defineCommand, all the keys passed to LUA script must be on the same machine and this is the only way you can use lua scripts on the cluster, you cant make calls to other machines from lua scripts either, check the tutorial on the redis cluster
Trust Score
1 verification
- 1
you cant really do that, you need to supply keys amount to defineCommand, all th
you cant really do that, you need to supply keys amount to defineCommand, all the keys passed to LUA script must be on the same machine and this is the only way you can use lua scripts on the cluster, you cant make calls to other machines from lua scripts either, check the tutorial on the redis cluster
Validation
Resolved in redis/ioredis GitHub issue #62. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep