Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

HashSlots in Redis Cluster

$
0
0

Currently I am having the below lua scriptlocal job_id = KEYS[1]; local job_body = KEYS[2];if job_id ==nil or job_id == '' then error('Invalid job id') end; if job_body ==nil or job_body == '' then error('Invalid job body') end;redis.call('HSET','JOB:WORK_BODY',job_id,job_body);

which is called using jedis cluster implementation using evalshasomething like: connection.evalsha(script, 2, jobId, jobBody)

This was working fine in normal redis but fails in cluster saying "JedisClusterOperationException: Keys must belong to same hashslot"

Documentation speaks about adding {} to the keys. But couldnt get where to and how to add in the above code.

Any help on this would be really helpful. Got stuck in this for a long time now.

Thanks in advance


Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>