-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Closed
Labels
Description
Describe the bug
When using RESP 3, the HKEYS command returns an empty hash when a key doesn't exist, but an array when it does exist.
To reproduce
Using redis-cli:
127.0.0.1:6379> HELLO 3
1# "server" => "redis"
2# "version" => "6.0.5"
3# "proto" => (integer) 3
4# "id" => (integer) 4
5# "mode" => "standalone"
6# "role" => "master"
7# "modules" => (empty array)
127.0.0.1:6379> HKEYS test_nonexistent_key
(empty hash)
Expected behavior
I expected the return type to be consistent with the type received when the key does exist (array). Although, I also think that a set might be more appropriate as a return type here.