Repository navigation
feat: wire zstd/lz4 per-token codecs into transfer layer - #3030
Merged
Merged
Conversation
- TokenReader: dispatch Zstd/LZ4 to CompressedTokenDecoder::new_zstd/new_lz4 - Delta generation: use create_token_encoder() helper for algorithm-aware encoder construction in both whole-file and delta-stream paths - Negotiation: advertise zstd/lz4 in supported_compressions() behind feature gates, matching upstream preference order (zstd > lz4 > zlibx) - Add tests for token reader dispatch, negotiation, and preference order
Update capability_fallback_graceful_compression_degradation to expect zstd/lz4 selection when features are enabled. Fix rustfmt in delta.rs.
…dated Revert supported_compressions() to only advertise zlibx/zlib/none. Zstd/lz4 per-token codecs are wired internally and usable via explicit --compress=zstd/lz4, but must not be auto-negotiated until wire-level interop with upstream rsync 3.4.1 is validated. Advertising them caused all compress interop tests to fail.
track_return() called notify_all() without holding the backpressure mutex, allowing notifications to fire between a waiter's outstanding.load() check and their condvar.wait() call. This caused the waiter to sleep indefinitely, hanging the memory_cap_backpressure_multiple_waiters test on macOS/Windows CI. Lock the mutex before notifying - the textbook condvar pattern that guarantees waiters either see the updated state before entering wait() or receive the notification after entering wait().
3 tasks
oferchen
added a commit
that referenced
this pull request
May 1, 2026
* feat: wire zstd/lz4 per-token codecs into transfer layer - TokenReader: dispatch Zstd/LZ4 to CompressedTokenDecoder::new_zstd/new_lz4 - Delta generation: use create_token_encoder() helper for algorithm-aware encoder construction in both whole-file and delta-stream paths - Negotiation: advertise zstd/lz4 in supported_compressions() behind feature gates, matching upstream preference order (zstd > lz4 > zlibx) - Add tests for token reader dispatch, negotiation, and preference order * fix: update compression negotiation test for zstd/lz4 support Update capability_fallback_graceful_compression_degradation to expect zstd/lz4 selection when features are enabled. Fix rustfmt in delta.rs. * fix: satisfy clippy vec-init-then-push lint * fix: replace redundant closures with function references * style: collapse method chains to single lines per rustfmt * fix: do not advertise zstd/lz4 in auto-negotiation until interop-validated Revert supported_compressions() to only advertise zlibx/zlib/none. Zstd/lz4 per-token codecs are wired internally and usable via explicit --compress=zstd/lz4, but must not be auto-negotiated until wire-level interop with upstream rsync 3.4.1 is validated. Advertising them caused all compress interop tests to fail. * fix: prevent lost wakeups in BufferPool backpressure condvar track_return() called notify_all() without holding the backpressure mutex, allowing notifications to fire between a waiter's outstanding.load() check and their condvar.wait() call. This caused the waiter to sleep indefinitely, hanging the memory_cap_backpressure_multiple_waiters test on macOS/Windows CI. Lock the mutex before notifying - the textbook condvar pattern that guarantees waiters either see the updated state before entering wait() or receive the notification after entering wait().
oferchen
added a commit
that referenced
this pull request
May 5, 2026
* feat: wire zstd/lz4 per-token codecs into transfer layer - TokenReader: dispatch Zstd/LZ4 to CompressedTokenDecoder::new_zstd/new_lz4 - Delta generation: use create_token_encoder() helper for algorithm-aware encoder construction in both whole-file and delta-stream paths - Negotiation: advertise zstd/lz4 in supported_compressions() behind feature gates, matching upstream preference order (zstd > lz4 > zlibx) - Add tests for token reader dispatch, negotiation, and preference order * fix: update compression negotiation test for zstd/lz4 support Update capability_fallback_graceful_compression_degradation to expect zstd/lz4 selection when features are enabled. Fix rustfmt in delta.rs. * fix: satisfy clippy vec-init-then-push lint * fix: replace redundant closures with function references * style: collapse method chains to single lines per rustfmt * fix: do not advertise zstd/lz4 in auto-negotiation until interop-validated Revert supported_compressions() to only advertise zlibx/zlib/none. Zstd/lz4 per-token codecs are wired internally and usable via explicit --compress=zstd/lz4, but must not be auto-negotiated until wire-level interop with upstream rsync 3.4.1 is validated. Advertising them caused all compress interop tests to fail. * fix: prevent lost wakeups in BufferPool backpressure condvar track_return() called notify_all() without holding the backpressure mutex, allowing notifications to fire between a waiter's outstanding.load() check and their condvar.wait() call. This caused the waiter to sleep indefinitely, hanging the memory_cap_backpressure_multiple_waiters test on macOS/Windows CI. Lock the mutex before notifying - the textbook condvar pattern that guarantees waiters either see the updated state before entering wait() or receive the notification after entering wait().
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
CompressedTokenDecoder::new_zstd()/new_lz4()intoTokenReader::new()dispatchcreate_token_encoder()helper indelta.rsfor algorithm-aware encoder creationsupported_compressions()to advertise zstd/lz4 behind feature gates, matching upstream preference order (zstd > lz4 > zlibx > zlib > none)Test plan
new_returns_compressed_for_zstd/new_returns_compressed_for_lz4token reader testssupported_compressions_includes_zstd/supported_compressions_includes_lz4preference order testsnegotiate_zstd_compression/negotiate_lz4_compressionnegotiation tests