env: Redis Cluster
Hi. My requirement is:
Find value-B thought key-A (The process is use key-A find out value-A, the value-A == key-B, use key-B find out value-B )
my lua looks like this:
[root@ml-208 redis]# cat x-userid-tag.lua
local f3=redis.call('HGET',KEYS[1],'1'); local f4=redis.call('HGET',f3,'1') ; return f4;
my redis cmd:
./bin/redis-cli -c -h 192.168.33.203 -p 6000 --eval ./x-userid-tag.lua 0C559F3FEF368A8B53DE69C267423F0E
error msg: (error) ERR Error running script (call to f_9bd20ba85f7bcc8ee1f6b55c4158bfa93eba2221): @user_script:2: @user_script: 2: Lua script attempted to access a non local key in a cluster node