-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"DUMP" command produces content not compatible with Redis #2251
Labels
bug
type bug
Comments
more over, KV Rocks is compatible with both dump content
|
krizald
changed the title
"DUMP" command produces content not compatible with Redis 6.2
"DUMP" command produces content not compatible with Redis
Apr 15, 2024
@krizald Thanks for your report, I will take a look while I get time. |
git-hulk
added a commit
that referenced
this issue
Apr 16, 2024
…yload (#2252) Currently, we're using the maximum RDB version(12) when dumping the payload which is not allowed in the old Redis versions(before Redis 7), so it will throw the error: ``` 127.0.0.1:6379> RESTORE a 0 "\x00\xc0{\x0c\x00\x83\x94g!\xfaP\xf9\xf0" (error) ERR DUMP payload version or checksum are wrong ``` This PR changes the payload's RDB version to 6 to make it work with the old Redis versions. And after applying this PR, it works well in Redis 4/6: ``` 127.0.0.1:6379> RESTORE a 0 "\x00\xc0{\x06\x00\xde\x0f;a\xf5/[*" OK 127.0.0.1:6379> get a "123" 127.0.0.1:6379> RESTORE a 0 "\x00\xc0{\x06\x00\xde\x0f;a\xf5/[*" OK 127.0.0.1:6379> get a "123" ``` Fixes #2251
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search before asking
Version
OS:
Debian 11 bullseye
KV Rock
version:unstable
git_sha1:433dcfb3
Minimal reproduce step
I checked and compiled KV Rocks from unstable (SHA: 433dcfb) and test the new "DUMP" command. My plan is to restore keys from KV Rocks back to Redis 6.2.10/7.2.4 using DUMP/RESTORE
Then I get the content: "\x00\x03ABC\x0c\x00\x8a\x95H\n\x1a\xf2\x0eO"
2. In Redis 6.2.10/7.2.4
I got message: (error) ERR DUMP payload version or checksum are wrong
What did you expect to see?
I ran the same commands in Redis 6.2.10
What I got is:
"\x00\x03ABC\t\x00\x91\x11-\x06\xb4^\xf3\xb7"
And when I restore, it works
What did you see instead?
For same string value "ABC", KV Rocks dumps:
"\x00\x03ABC\x0c\x00\x8a\x95H\n\x1a\xf2\x0eO"
Redis 6.2.10 is
"\x00\x03ABC\t\x00\x91\x11-\x06\xb4^\xf3\xb7"
Anything Else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: