docs: defer compressed on-disk RDB (S3.1/S3.2) to v2#1
Draft
GilboaAWS wants to merge 1 commit into
Draft
Conversation
Compressed on-disk RDB (RDB_ENC_COMPRESSED encode/decode, R2.6.1-R2.6.4)
is a local-snapshot optimization — smaller/faster RDB and faster
warm-up to the compressed state after a restart. It is NOT a
correctness requirement and NOT a sync-speed improvement: full-sync
replication is uncompressed in v1 regardless (R2.6.8).
v1 is already correct and memory-safe without it:
- All RDB save targets (disk, full-sync, AOF preamble, DUMP/MIGRATE)
emit uncompressed, routing each value through
objectGetUncompressedView at save time (PR valkey-io#24). Decompression is
transient and per-value (one throwaway scratch sds at a time; the
live compressed robj is never mutated), so a full-keyspace save
never decompresses everything at once — peak overhead is a single
value <= compression-max-value-size.
- On load there is nothing compressed to read; the sweeper
re-compresses in memory afterward.
Changes:
- plan.md: S3.3 (full-sync uncompressed) and S3.4 (AOF uncompressed)
marked complete — covered by PR valkey-io#24. S3.1/S3.2 marked deferred and
added to the §8 v2 list.
- design §2.6: scope note at the top; R2.6.1-R2.6.4 tagged v2;
R2.6.8 and the §1 boundary note updated for the v1/v2 split.
In v1 RDB_ENC_COMPRESSED (=4) stays reserved-but-unused and
RDB_VERSION is not bumped.
8b5c876 to
1385234
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves compressed on-disk RDB (the
RDB_ENC_COMPRESSEDencode/decode path, R2.6.1–R2.6.4) from v1 to v2. Docs-only.Rationale
Compressed on-disk RDB is a local-snapshot optimization — smaller/faster RDB file and faster warm-up back to the compressed state after a restart. It is not a correctness requirement and not a sync-speed improvement: full-sync replication is uncompressed in v1 regardless (R2.6.8).
v1 is already correct and memory-safe without it:
objectGetUncompressedViewat save time (PR . valkey-io/valkey#24). Verified:rdbSaveStringObject(rdb.c) andrioWriteBulkObject(aof.c:1909) both decompress.compression-max-value-size. (This also answers the memory-overflow concern: no overflow risk.)Changes
In v1,
RDB_ENC_COMPRESSED(=4) stays reserved-but-unused andRDB_VERSIONis not bumped.Not changing
R2.6.5–R2.6.8 (AOF / replication / DUMP / full-sync all uncompressed) hold in both v1 and v2 — no behavior change.