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

Support RDB compatability with Redis 7.2.4 RDB format #665

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

ranshid
Copy link
Member

@ranshid ranshid commented Jun 18, 2024

This PR makes our current RDB format compatible with the Redis 7.2.4 RDB format. there are 2 changes introduced in this PR:

  1. Move back the RDB version to 11
  2. Make slot info section persist as AUX data instead of dedicated section.

We have introduced slot-info as part of the work to replace cluster metadata with slot specific dictionaries. This caused us to bump the RDB version and thus we prevent downgrade (which is conceptualy O.K but better be prevented). We do not require the slot-info section to exist, so making it an AUX section will help suppport version downgrade from Valkey 8.

fixes: #645

NOTE: tested manually by:

  1. connecting Redis 7.2.4 replica to a Valkey 8(RC)
  2. upgrade/downgrade Redis 7.2.4 cluster and Valkey 8(RC) cluster

This PR makes our current RDB format compatible with the Redis 7.2.4 RDB format.
there are 2 changes introduced in this PR:
1. Move back the RDB version to 11
2. Make slot info section persist as AUX data instead of dedicated
   section.

We have introduced slot-info as part of the work to replace cluster metadata with slot specific dictionaries.
This caused us to bump the RDB version and thus we prevent downgrade
(which is conceptualy O.K but better be prevented). We do not require
the slot-info section to exist, so making it an AUX section will help
suppport version downgrade from Valkey 8.

fixes: [valkey-io#645](valkey-io#645)

Signed-off-by: ranshid <ranshid@amazon.com>
Signed-off-by: ranshid <ranshid@amazon.com>
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 69.99%. Comparing base (a2cc2fe) to head (b8089a1).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #665      +/-   ##
============================================
- Coverage     70.20%   69.99%   -0.21%     
============================================
  Files           110      110              
  Lines         60078    60069       -9     
============================================
- Hits          42179    42047     -132     
- Misses        17899    18022     +123     
Files Coverage Δ
src/valkey-check-rdb.c 64.21% <ø> (+1.83%) ⬆️
src/rdb.c 75.46% <68.75%> (-0.51%) ⬇️

... and 10 files with indirect coverage changes

Signed-off-by: ranshid <ranshid@amazon.com>
src/rdb.c Outdated Show resolved Hide resolved
@madolson madolson requested a review from hpatro June 18, 2024 15:45
@madolson madolson added the release-notes This issue should get a line item in the release notes label Jun 18, 2024
Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
Signed-off-by: ranshid <ranshid@amazon.com>
@ranshid ranshid force-pushed the fix-rdb-compatibility-issues branch from c678783 to b8089a1 Compare June 18, 2024 15:54
@madolson
Copy link
Member

Added release notes tag to remind us that we need to make it clear that we don't want to indicate that is an RDB op code bump.

@madolson madolson added the major-decision-approved Major decision approved by TSC team label Jun 18, 2024
@madolson madolson merged commit be2c321 into valkey-io:unstable Jun 18, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-decision-approved Major decision approved by TSC team release-notes This issue should get a line item in the release notes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Changing Valkey RDB magic for Valkey 8
4 participants