dragonflydb / dragonflydb/dragonfly
Adopt upstream RDB encoding for hash-field expiration
Open
@BorysTheDev is already working on this.
Since Sep 7, 2026.
- Dominant language
- C++
- Stars
- 31.6k
- Forks
- 1.3k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 137
Description
Dragonfly currently saves hashes with field expiration using the private RDB_TYPE_HASH_WITH_EXPIRY type (31),
with expiry stored as an RDB string in Dragonfly-relative seconds.
Add support for Redis 8 hash-expiry encodings and stop emitting the Dragonfly-specific format for new
snapshots. Prefer Redis types 24/25 because Dragonfly emits a REDIS header; Valkey type 22 should only be used with VALKEY080.
Scope:
- Load Redis RDB_TYPE_HASH_METADATA (24) and RDB_TYPE_HASH_LISTPACK_EX (25).
- Emit Redis encoding for new hash-expiry snapshots.
- Continue reading Dragonfly type 31 for backward compatibility.
- Handle the Redis minimum-expiry and per-field delta representation.
- Preserve persistent fields, expiry rounding, and overflow saturation.
- Avoid ambiguity with Redis’s pre-GA type 22 encoding.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.