Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In valkey 9+, the rdb format was forked, and valkey adopted new rdb version 80.
considering valkey is now widely used after redis changed its license model, we purpose this as a start of valkey rdb support.
the rdb headers are now different, for example, "REDIS0012" and "VALKEY080"
valkey added new opcode RDB_OPCODE_SLOT_INFO and RDB_OPCODE_SLOT_IMPORT.
(we may have to do more someday on the later since it will have the same value of 243 as redis RDB_OPCODE_KEY_META in the future.)
different encoding of hash with field expiration (hfe), RDB_TYPE_HASH_2.
(Though this macro has the same value of redis RDB_TYPE_HASH_METADATA_PRE_GA, we are probably ok this time, since the later is only used in a rc version and ditched now.)
The encoding of HASH_2 is much simpler. It just stores fields, values and expiration timestamps. However, here NO-TTL should be represented by -1 instead of 0 in rdb stream.
please review this. thank you for your advancing help.