Closed knguyen2525 closed 9 years ago
LUA will not work at cluster mode... You can access only to local keys, there is no communication layer in LUA.
The lua context is not aware of the cluster, it does not know which node in the cluster is responsible for the "foo" key or any other. In a redis cluster you shouldn't use Lua to access/change objects in the database.
Even if you parsed cluster slots to find the keyslot for foo manually, from the lua context I think you cannot connect to the correct node. Outside of that context you can, but outside of that context you can use this driver to put the key in the correct place too ;)
I am using the poor man cluster client to run a basic lua script: "return redis.call('GET', 'foo')" but the client is not able to recognize where the key "foo" is stored.
Is there a way to do this besides parsing CLUSTER SLOTS to find the keyslot for foo manually?