Using RedisTemplate executePipelined, rightPushAll and lRange behavior #3123
Labels
status: waiting-for-feedback
We need additional information before we can continue
status: waiting-for-triage
An issue we've not yet triaged
I'm using rightPushAll inside executePipelined like below to put List data into redis list,
And for the code using range to get list data from redis
The above code work nicely, but i notice that instead of storing the elements individually as List<Object, Object, Object, ...>, Redis stored the entire list as a single element, resulting in List<List>.
I ran some tests and confirmed that whether I use executePipelined or not, the command rightPushAll(kxy, rows) produces the same result. However, if I use rightPushAll(kxy, rows.toArray()), the result turns out as expected, something like List<Object, Object, Object, ...>.
Additionally, when retrieving data from the list using range without executePipelined, it fails to fetch the data correctly. But with executePipelined, it retrieves the data as expected. Since all the inserted data is stored within a single element, the retrieved data structure is List<List>.
Is the above behavior expected, or did I make a mistake in how I used it?
The text was updated successfully, but these errors were encountered: