Replication compression configs and handshake negotiation#16
Open
roshkhatri wants to merge 1 commit into
Open
Conversation
… config
Introduces REPLICA_CAPA_COMPRESSION handshake negotiation and a
replcompression boolean config. A replica with replcompression=yes
advertises capa compression during the PSYNC handshake when using
diskless load. The primary records REPLICA_CAPA_COMPRESSION on the
replica's capa bitmask but takes no action on it yet — compressed
replication transport lands in a follow-up.
Compression parameters (algorithm, level) are fixed internally via
REPL_COMPRESSION_ALGO (ALGO_LZ4) and REPL_COMPRESSION_LEVEL (5, HC
mode) and will become configurable in a later release.
- src/server.h: new REPLICA_CAPA_COMPRESSION (1<<4) flag, matching
_STR, repl_compression field, and REPL_COMPRESSION_{ALGO,LEVEL}
constants
- src/config.c: new replcompression bool config
- src/replication.c: primary records capa in replconfCommand; replica
advertises capa compression when server.repl_compression and
useDisklessLoad(); argv/lens arrays grown from 9 to 11 entries;
useDisklessLoad() extracted into a local reused by skip-rdb-checksum
and compression checks
- valkey.conf: new replcompression config documentation block
- src/unit/test_repl_compression.cpp: 3 GTest cases covering capa bit
uniqueness, capa string, and ALGO_LZ4 non-zero
- tests/integration/repl-compression.tcl: 9 TCL integration tests
covering config CRUD, CONFIG REWRITE persistence, and handshake
behavior
Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
c5ecfeb to
92db9be
Compare
750a667 to
68b9d75
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.
… config
Introduces REPLICA_CAPA_COMPRESSION handshake negotiation and a replcompression boolean config. A replica with replcompression=yes advertises capa compression during the PSYNC handshake when using diskless load. The primary records REPLICA_CAPA_COMPRESSION on the replica's capa bitmask but takes no action on it yet — compressed replication transport lands in a follow-up.
Compression parameters (algorithm, level) are fixed internally via REPL_COMPRESSION_ALGO (ALGO_LZ4) and REPL_COMPRESSION_LEVEL (5, HC mode) and will become configurable in a later release.