shinberg / cpp-hiredis-cluster

c++ cluster wrapper for hiredis with async and unix sockets features
BSD 3-Clause "New" or "Revised" License
65 stars 26 forks source link

Issue with executing a script with multiple keys #27

Open pravinmote88 opened 5 years ago

pravinmote88 commented 5 years ago

Hi,

I have written a small script which has two keys. These keys have a tag to have them in a single node of cluster. The script increments the values of those two keys -

local id = '12345' local key1 = 'abc.{user1000}. followers' local key2 = 'abc.{user1000}. following' redis.call('INCR', key1) redis.call('HINCRBY', key2, id, 1)

I have used tag which is given in the redis documentation example. I loaded the script and executed with your client. It works. But when I change the tag to something else like {aser1000}.. IT DOESN'T WORK.

Is there any specific rule for defining the tag in a key? Will you please give an example for executing a lua script with multi-key operation?