#4697·valkey

Decouple full-sync wire compression from local RDB storage policy

Author: roshkhatriCreated Sep 15, 2026Updated Sep 16, 2026

Diskless full sync has a clear policy: repl-compression controls compression of the network stream.

Disk-based full sync is more complicated because the same RDB may be used both for replication and as a persisted snapshot. The primary and replica may have different local rdbcompression settings, so one file cannot always satisfy both the negotiated wire format and each node’s storage preference.

Currently, the receiver keeps the format selected by the sender when it supports the codec. This works for the current implementation, but we should decide whether it is the desired long-term policy.

Questions to discuss:

  • Should rdbcompression control only locally stored RDB files?
  • Should repl-compression independently control the full-sync wire format?
  • When the wire and local formats differ, should we:
    • keep the received format;
    • create a new local snapshot afterward; or
    • transcode while sending or receiving?
  • How should this interact with disk-based loading, checksums, LZF, AOF preambles, and replicas that do not support the selected codec?

This is a design follow-up and does not block #3853.