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

Add support to hash-field-expiration RDB_TYPE v2 #48

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

moticless
Copy link
Collaborator

@moticless moticless commented Jul 10, 2024

The RDB serialization of hashes with expiration on fields (aka. HFE) was modified
to write also at the begining the minimum expiration time.

Following this change, the new value will be digested but won't be propagated to
the callback handlers since it is actually a redundant information since each field
already "reports" its expiration time to handlers (This value will might be
used in the future for optimization in the context of dumping directly
from RDB to FLUSH without parsing the object).

Before:
#define RDB_TYPE_HASH_METADATA 22
#define RDB_TYPE_HASH_LISTPACK_EX 23

After:
/* Hash with HFEs. Doesn't attach min TTL at start */
#define RDB_TYPE_HASH_METADATA_PRE_GA 22      
/* Hash LP with HFEs. Doesn't attach min TTL at start */
#define RDB_TYPE_HASH_LISTPACK_EX_PRE_GA 23   
/* Hash with HFEs. Attach min TTL at start */
#define RDB_TYPE_HASH_METADATA 24             
/* Hash LP with HFEs. Attach min TTL at start */
#define RDB_TYPE_HASH_LISTPACK_EX 25          
  • Tested manually "_PRE_GA" by running tests against earlier Redis version.

src/lib/parser.c Outdated Show resolved Hide resolved
src/lib/parser.c Outdated Show resolved Hide resolved
src/lib/parser.c Outdated Show resolved Hide resolved
src/lib/parserRaw.c Outdated Show resolved Hide resolved
test/test_rdb_to_redis.c Outdated Show resolved Hide resolved
tezc
tezc previously approved these changes Jul 11, 2024
@moticless moticless marked this pull request as ready for review July 11, 2024 11:15
@moticless moticless merged commit 08757bf into redis:main Jul 11, 2024
2 checks passed
@moticless moticless deleted the 7.4-support-hexpire-v2 branch July 11, 2024 11:17
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