Skip to content
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

chore: allow rdb version 12 #3860

Merged
merged 3 commits into from
Oct 7, 2024
Merged

chore: allow rdb version 12 #3860

merged 3 commits into from
Oct 7, 2024

Conversation

kostasrim
Copy link
Contributor

We currently support rdb files up to version 11. This is a blocker for people who want to migrate to dragonfly with newer versions of the format. As of now, there is only v12 and it only includes the addition of RDB_OPCODE_SLOT_INFO. For now this PR:

  • adds support to load rdb files up to version 12
  • reads and discards with a warning the contents of RDB_OPCODE_SLOT_INFO if found in the rdb file

addresses: #3859

@kostasrim
Copy link
Contributor Author

kostasrim commented Oct 3, 2024

@romange I ignore the OPCODE all together and issue a warning. The important thing is to be able to load rdb files with version 12. If the contents of this OPCODE become important to us, we can store them since I already added the parsing logic in rdb_load.

The person who reported this does not use cluster and wants to migrate to DF.

@kostasrim kostasrim self-assigned this Oct 3, 2024
SET_OR_RETURN(LoadLen(nullptr), slot_size);
[[maybe_unused]] uint64_t expires_slot_size;
SET_OR_RETURN(LoadLen(nullptr), expires_slot_size);
LOG(WARNING) << "Loaded and ignored RDB_OPCODE_SLOT_INFO";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we dont need to print this warning

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than that lgtm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good

@kostasrim kostasrim requested a review from adiholden October 7, 2024 06:35
@kostasrim kostasrim enabled auto-merge (squash) October 7, 2024 07:03
@kostasrim kostasrim merged commit dac1b0f into main Oct 7, 2024
12 checks passed
@kostasrim kostasrim deleted the kpr4 branch October 7, 2024 07:14
kostasrim added a commit that referenced this pull request Oct 7, 2024
We currently support rdb files up to version 11. This is a blocker for people who want to migrate to dragonfly with newer versions of the format. As of now, there is only v12 and it only includes the addition of RDB_OPCODE_SLOT_INFO.

* adds support to load rdb files up to version 12
* reads and discards with a warning the contents of RDB_OPCODE_SLOT_INFO if found in the rdb file

---------

Signed-off-by: kostas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants