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

Redis Lettuce HSET / HGET results in CLUSTERDOWN Hash slot not served

$
0
0

Im working with Lettuce 6.1.8.RELEASE.

Locally i have a Redis-Cluster with 3 Master / 3 Slaves.With Redis-CLI Keys / Hashes are set as usual.

redis-cli -p 6379 cluster nodes127.0.0.1:6379@16379 myself,master - 0 1659514605000 1 connected 0-5460127.0.0.1:6384@16384 slave 0 1659514606000 1 connected127.0.0.1:6383@16383 slave 0 1659514606000 3 connected127.0.0.1:6380@16380 master - 0 1659514605958 2 connected 5461-10922127.0.0.1:6382@16382 slave 0 1659514606559 2 connected127.0.0.1:6381@16381 master - 0 1659514606559 3 connected 10923-16383

In Lettuce the following code works:

private final StatefulRedisClusterConnection<String, String> connection;public void set(String key, String value, long expireSeconds) {    connection.async().set(key, value, SetArgs.Builder.ex(expireSeconds));    connection.flushCommands();}

Keys are set in local Redis / Get method also returns the value

But when trying to set a Hash with same connection, no exception is thrown and no keys are set to redis:

 private final StatefulRedisClusterConnection<String, String> connection; public void hset(String key, String field, String value, long expireSeconds){    RedisAdvancedClusterAsyncCommands<String, String> async = connection.async();    async.hset(key, field, value);    async.expire(key, expireSeconds);    connection.flushCommands();}

The only thing noticeble is that a HGETALL results in CLUSTERDOWN Hash slot not served. But i would expect a different redis-cli -p 6379 cluster nodes results.


Viewing all articles
Browse latest Browse all 2204

Trending Articles



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