-
Notifications
You must be signed in to change notification settings - Fork 5.5k
HGET implementation in Redisson #2200
Copy link
Copy link
Closed
Description
Apologies if this is something simple that I've missed out
Have been trying to figure this out for a while but can't.
Trying to simply get the value associated with field in the hash stored at key as described in the documentation for HGET
The code used is
RedissonClient redisson = Redisson.create();
RMap<String, String> map = redisson.getMap("myhash");
System.out.println(map.get("a"));
However, it seems like this implementation fetches all values stored in all fields in 'myHash' instead of just the value stored in field 'a'. Unsure if this fetching of values happens during redisson.getMap ( More likely ) or map.get()
Expected behavior
Redisson issues only one HGET and retrieves only the value of field 'a' in hash 'myhash'
Actual behavior
Redisson seems to be fetching values of all fields in 'myhash'
Steps to reproduce or test case
redis-cli
HSET myhash a valueofa
HSET myhash b valueofb
HSET myhash c valueofc
java
RedissonClient redisson = Redisson.create();
RMap<String, String> map = redisson.getMap("myhash");
System.out.println(map.get("a"));
Redis version
4.0.9
Redisson version
3.10.7
Redisson configuration
Default ( Testing on localhost )
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels