Skip to content
This repository was archived by the owner on Jun 5, 2024. It is now read-only.

Redis array response is wrongly translated #95

Open
gupta-mukul opened this issue May 24, 2023 · 0 comments
Open

Redis array response is wrongly translated #95

gupta-mukul opened this issue May 24, 2023 · 0 comments

Comments

@gupta-mukul
Copy link

I have implemented a Redis module that made a custom command available in Redis. This command returns an array with a single value of type integer.

When I run the command on redis-cli, It is correctly displayed as an array with a single element.

127.0.0.1:6379> udsf.delrec recordID1 RealmID1 StorageID
1) (integer) 0
127.0.0.1:6379> 

However, when executing this command through fred, RedisValue received is of type RedisValue::Integer (and not RedisValue::Array). It works when an array contains more than one element.

It seems like fred is translating an array with only one element to a basic type. Since this is a common response format that is being shared across multiple commands (with some commands filling in more than one element), this is breaking the application parsing of response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant