You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had searched in the issues and found no similar issues.
Version
2.9.0
Minimal reproduce step
127.0.0.1:6666> set k -1
OK
127.0.0.1:6666> get k
"-1"
127.0.0.1:6666> dump k
"\x00\xc0\xff\x06\x00\x9a~\x16\xa4p]\xa1V"
127.0.0.1:6666> restore k1 0 "\x00\xc0\xff\x06\x00\x9a~\x16\xa4p]\xa1V"
OK
127.0.0.1:6666> get k1
"255"
127.0.0.1:6666> get k
"-1"
127.0.0.1:6666> set k2 -2
OK
127.0.0.1:6666> get k2
"-2"
127.0.0.1:6666> dump k2
"\x00\xc0\xfe\x06\x00$FVjY\x0c\xb3\xa2"
127.0.0.1:6666> restore k22 0 "\x00\xc0\xfe\x06\x00$FVjY\x0c\xb3\xa2"
OK
127.0.0.1:6666> get k2
"-2"
127.0.0.1:6666> get k22
"254"
What did you expect to see?
The value remains negative after RESTORE.
What did you see instead?
when restoring dumped negative integers, the values are restored as positive numbers (255 for -1 and 254 for -2).
Search before asking
Version
2.9.0
Minimal reproduce step
What did you expect to see?
The value remains negative after RESTORE.
What did you see instead?
when restoring dumped negative integers, the values are restored as positive numbers (255 for -1 and 254 for -2).
Anything Else?
Possibly a problem with the following code?
kvrocks/src/storage/rdb.cc
Lines 158 to 160 in 2a0c57a
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: