Open Aditya-Bhalerao opened 1 week ago
Hi @arpitbbhayani I would like to work on this issue.
I came across this issue while working on https://github.com/DiceDB/dice/issues/378
cc: @JyotinderSingh
@swarajrb7 go for it. Thanks for picking it up!
Few more additions to this -
This is occurring with SET command as well.
# On DiceDB
127.0.0.1:7379> SET "\x00\x01" "value"
OK
127.0.0.1:7379> get "\x00\x01"
"value"
127.0.0.1:7379> get \x00\x01
"value"
# On Redis
127.0.0.1:6379> SET "\x00\x01" "value"
OK
127.0.0.1:6379> get "\x00\x01"
"value"
127.0.0.1:6379> get \x00\x01
(nil)
In Redis, the key is treated as a binary-safe string, while DiceDB seems to be interpreting unquoted binary sequences as valid keys, leading to the discrepancy.
The command
MSET
is not consistent with Redis implementation. Here are the steps to reproduce the issueExecute Command - MSET key value (Where key is an binary data) Excute Command - GET key
Here's the output I observed in Redis v7.2.5
and here's the output I observed in DiceDB's latest commit of the
master
branch(Observe the value printed by GET in absense of double-quotes)
To summarize -
Make the implementation consistent with the Redis implementation. Make sure you are using Redis version 7.2.5 as a reference for the command implementation and to setup Redis