Skip to content

Conversation

@bpint
Copy link
Contributor

@bpint bpint commented Aug 16, 2025

redis 7.4+ introduced HFE, i. e., hash / listpack with field expiration, with type identifier 22, 23, 24, and 25 in rdb format 12.

this add basic support for rdb 12 compatible with redis 7.4+,

a) HashObjectEx type, which can be formatted as json, as well as RESP commands (obj2cmd)
b) decoding hash / listpack HFE from rdb
c) encoding HashObjectEx as rdb (hash HFE)

@HDT3213
Copy link
Owner

HDT3213 commented Aug 17, 2025

  1. Could you add some test cases?
  2. I tend not to add HashObjectEx; instead, I prefer to add the FieldExpirations map[string]int64 field to the existing HashObject to maintain compatibility.

@bpint
Copy link
Contributor Author

bpint commented Aug 18, 2025

i resubmitted the pr. now,

a) HashObject with field expirations instead of HashObjectEx, as your wish
b) rdb samples as test cases of hash and listpack with hfe are added
c) i found a bug in my obj2cmd and fixed it

@HDT3213
Copy link
Owner

HDT3213 commented Aug 18, 2025

Looks good to me! Thanks for your contribution!

@HDT3213 HDT3213 merged commit 70ae50a into HDT3213:master Aug 18, 2025
1 of 2 checks passed
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